<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msinfluentials.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>Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx</link><description>Thor Larholm, unhelpfully, published details on what he claims is a 0-day exploit for Internet Explorer (IE) yesterday. This exploit is actually for Firefox, but Thor exploited it by making IE launch Firefox. Firefox creates three protocol handlers. A</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#9800</link><pubDate>Sat, 01 Nov 2008 19:34:12 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:9800</guid><dc:creator>Poartoem</dc:creator><description>&lt;p&gt;Since the request is passed to shell in the end and you know how it handles quote characters, there is no need know what the target considers legal.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=9800" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#8818</link><pubDate>Tue, 15 Jul 2008 11:48:58 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:8818</guid><dc:creator>driver</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;jesper, the point is that IE is failing to pass the URL it should be passing, because it doesn&amp;#39;t escape quotes correctly, so quotes in the URL can lead to a situation where IE actually passes multiple command-line arguments, not just a URL.&lt;/p&gt;
&lt;p&gt;Firefox&amp;#39;s handling is suboptimal, and will be fixed, but IE still has a bug here -- it&amp;#39;s not passing the right data to other applications.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=8818" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6652</link><pubDate>Tue, 24 Jul 2007 03:28:29 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6652</guid><dc:creator>Harry Johnston</dc:creator><description>&lt;p&gt;Seems it&amp;#39;s slightly more complicated than at first it seemed. &amp;nbsp;The relevant Microsoft documentation &lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/aa767914.aspx&amp;gt;"&gt;msdn2.microsoft.com/.../aa767914.aspx&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;requires URIs to be decoded before being passed to the protocol handlers. &amp;nbsp;That is, you should be able to exploit the reported vulnerability without using illegal URIs.&lt;/p&gt;
&lt;p&gt;This changes things. &amp;nbsp;It means that IE (and other browsers) can&amp;#39;t fix the problem without potentially breaking third-party protocol handlers that depend on the documented behavior.&lt;/p&gt;
&lt;p&gt;Technically, it also means Jesper (and Microsoft) are correct; the bug is in the software registering the protocol handler (Firefox in this case) not in the software calling it.&lt;/p&gt;
&lt;p&gt;However, I&amp;#39;m still going to blame Microsoft, because frankly, passing URIs between applications in decoded form was a really really dumb idea. &amp;nbsp;Very few application developers would have spotted this particular trap.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6652" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6637</link><pubDate>Sun, 22 Jul 2007 20:38:02 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6637</guid><dc:creator>Alun Jones</dc:creator><description>&lt;p&gt;I think Labertasche is confused by Jesper&amp;#39;s wording. Yes, urlmon.dll processes the registry keys to figure out which protocol handler to call, builds the command line, and executes the handler, but as Jesper says, it does no processing on the URL - it reads it in, and it hands it along, unprocessed - unchanged.&lt;/p&gt;
&lt;p&gt;As it turns out, the shell does not handle quote characters in this case. It is the runtime library for the particular language which does.&lt;/p&gt;
&lt;p&gt;If you choose C or C++ as your language of choice, for instance, the command line string as a whole is parsed in the CRT library routine parse_cmdline(), which (if you have Visual Studio installed) is in %ProgramFiles%\Microsoft Visual Studio 8\VC\crt\src\stdargv.c&lt;/p&gt;
&lt;p&gt;If you use assembler, or write your program for Win32 (with a start function of WinMain instead of main), you&amp;#39;ll be given the command line as a single string from first character entered to the final character provided by your caller.&lt;/p&gt;
&lt;p&gt;Double-quote processing is a feature of C and C++, NOT of the Windows executable calling mechanism.&lt;/p&gt;
&lt;p&gt;To put it another way, double quotes are only special to Firefox because Firefox&amp;#39;s programmers chose to treat them specially. As such, it&amp;#39;s their responsibility to ensure that they are handled correctly when faced with data provided by untrusted third parties.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6637" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6634</link><pubDate>Sun, 22 Jul 2007 18:20:51 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6634</guid><dc:creator>Harry Johnston</dc:creator><description>&lt;p&gt;Labertasche:- the request is (almost certainly) handed to the Windows API, not to the shell; further, the shell doesn&amp;#39;t process quote marks at all when passing a command line to an external executable.&lt;/p&gt;
&lt;p&gt;(However, the legal characters are defined by STD66 so IE/urlmon should have no difficulty in this regard.)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6634" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6620</link><pubDate>Sat, 21 Jul 2007 06:39:26 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6620</guid><dc:creator>Labertasche</dc:creator><description>&lt;p&gt;OK if neither IE nor urlmon.dll reads the regkey, substitutes the %1 and passes this constructed command to the shell, which part does it?&lt;/p&gt;
&lt;p&gt;&amp;quot;It does not know what the called application considers legal and has no way to find out.&amp;quot;&lt;/p&gt;
&lt;p&gt;Since the request is passed to shell in the end and you know how it handles quote characters, there is no need know what the target considers legal.&lt;/p&gt;
&lt;p&gt;&amp;quot;It could potentially attempt to make the URL conform to a legal URL, but as urlmon.dll does no processing on the URL at all, it really ought to be up to the application that processes it to make sure it conforms to whatever conventions and rules that application expects.&amp;quot;&lt;/p&gt;
&lt;p&gt;Since the encoding rules are the same for every URI the caller knows what the target expects. Also the caller knows exactly what is part of the URI while the target needs to reconstruct it in this case.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6620" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6616</link><pubDate>Fri, 20 Jul 2007 17:21:42 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6616</guid><dc:creator>jesper</dc:creator><description>&lt;p&gt;I think this is very different from a SQL injection bug. In the SQL injection case it is the middleware that parses input and constructs a command. It knows all about what is legal and what is not, while the database knows nothing about what is legal. &lt;/p&gt;
&lt;p&gt;In the case of the Firefox input validation failure, urlmon.dll is simply passing on a string it received as a command. It does not know what the called application considers legal and has no way to find out. It could potentially attempt to make the URL conform to a legal URL, but as urlmon.dll does no processing on the URL at all, it really ought to be up to the application that processes it to make sure it conforms to whatever conventions and rules that application expects. You cannot blame a web server for a SQL injection bug as it merely passes the input data onto the middleware application. It is the same in the case at hand; urlmon is simply passing on the input data to the protocol handler.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6616" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6613</link><pubDate>Fri, 20 Jul 2007 16:05:44 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6613</guid><dc:creator>Labertasche</dc:creator><description>&lt;p&gt;@jesper&lt;/p&gt;
&lt;p&gt;How does that differ from a SQL injection? The &amp;quot;middleware&amp;quot; application (IE) takes input (the URL), parses it, constructs a query, and sends it on to the shell.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6613" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6609</link><pubDate>Fri, 20 Jul 2007 06:38:55 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6609</guid><dc:creator>Fernando</dc:creator><description>&lt;p&gt;@inkredibl&lt;/p&gt;
&lt;p&gt;RFC 1738 has long been superseeded. Try RFC 3986.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6609" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6604</link><pubDate>Fri, 20 Jul 2007 00:51:55 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6604</guid><dc:creator>Keith</dc:creator><description>&lt;p&gt;This was a very fruitful conversation. &amp;nbsp;I came off MozillZine to here not knowing exactly what to think. &amp;nbsp;So, in summary, it&amp;#39;s not Microsoft&amp;#39;s fault because Firefox is using a feature in a more advanced way than it&amp;#39;s designed to be? &amp;nbsp;Well, I use SeaMonkey in Linux, but still it&amp;#39;s good to get things cleared up.&lt;/p&gt;
&lt;p&gt;Of course, it is possible to implement URLs correctly (for general idiot-proofing) or make the function&amp;#39;s limitations more explicit. &amp;nbsp;I&amp;#39;m not going to be a Microsoft apologist or a Firefox fanboy here, but I&amp;#39;m just saying.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6604" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6596</link><pubDate>Thu, 19 Jul 2007 11:08:39 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6596</guid><dc:creator>inkredibl</dc:creator><description>&lt;p&gt;Blame Microsoft for not following standards (nothing new here)...&lt;/p&gt;
&lt;p&gt;RFC 1738:&lt;/p&gt;
&lt;p&gt;only alphanumerics, the special characters &amp;quot;$-_.+!*&amp;#39;(),&amp;quot;, and reserved characters used for their reserved purposes may be used _unencoded_ within a URL.&lt;/p&gt;
&lt;p&gt;Not sure if this is Windows or IE, but it sure as hell is Microsoft&amp;#39;s fault! Of course Firefox _can_ fix that in one way or another, but that doesn&amp;#39;t mean Firefox is guilty. Any other URL handler can be exploited like this and Firefox fix won&amp;#39;t affect others, only Microsoft could fix it once and for all, but they won&amp;#39;t - why bother...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6596" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6593</link><pubDate>Thu, 19 Jul 2007 00:39:32 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6593</guid><dc:creator>Harry Johnston</dc:creator><description>&lt;p&gt;OK; the fact that this behavior is documented puts some of the blame on Mozilla. &amp;nbsp;Fair enough. &amp;nbsp;(The behavior is still incorrect, so I&amp;#39;m still going to put most of the blame on Microsoft.)&lt;/p&gt;
&lt;p&gt;In particular note that your statement &amp;quot;The argument could be made that IE should not permit quotes to be passed, but why would quotes be illegal in all custom protocols?&amp;quot; is incorrect.&lt;/p&gt;
&lt;p&gt;Quotes are illegal in all custom protocols, because they&amp;#39;re illegal in the definition of a URL. &amp;nbsp;No URL may contain a quote mark. &amp;nbsp;If a custom protocol uses quote marks, that protocol is in violation of the standards. &amp;nbsp;(STD66.)&lt;/p&gt;
&lt;p&gt;QED. :-)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6593" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6574</link><pubDate>Sun, 15 Jul 2007 15:35:00 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6574</guid><dc:creator>Charles Burnaford</dc:creator><description>&lt;p&gt;There is a way for IE to filter this attack out. &amp;nbsp;It should not allow the opening of an http: URL by any other program other than itself. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Of course this would require that the program be apprised of the various alternate browsers. &amp;nbsp; I know that this kind of thing is done with SSL CA certificates.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6574" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6570</link><pubDate>Fri, 13 Jul 2007 01:02:13 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6570</guid><dc:creator>Alun Jones</dc:creator><description>&lt;p&gt;I&amp;#39;ve got to agree with Jesper here - IE laid down the parameter-passing method, and given that there&amp;#39;s only one parameter (&amp;quot;the rest of the URL after the scheme and the colon&amp;quot;), there&amp;#39;s not much point doing any quoting, encoding, or anything - as long as the end of the parameter is uniquely defined (and if not, what has the attacker done?)&lt;/p&gt;
&lt;p&gt;Remember, too, that the parameter parsing mechanism used here is going to be solely dependent on the language and API the protocol handler uses. It&amp;#39;s only because most people use C / C++ / etc that we&amp;#39;re used to seeing multiple arguments separated by spaces, tabs, etc. What the OS passes in to the executable is the entire command line from start to finish in one long string.&lt;/p&gt;
&lt;p&gt;Any other structure that you believe is present in the command line is imposed by the runtime library that the executable starts up before it calls the &amp;quot;main()&amp;quot; or other first developer-level function.&lt;/p&gt;
&lt;p&gt;Yes, because the source is a URL, using URL encoding would make sense as well, but that would only make a significant difference if using that encoding prevented ambiguity in parsing the URL. In this case, because there&amp;#39;s no special character in the command-line, there&amp;#39;s no ambiguity in parsing - every byte of the command-line past the executable&amp;#39;s name is _the_ only parameter to the protocol handler.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6570" width="1" height="1"&gt;</description></item><item><title>re: Blocking the Firefox -&gt; IE 0-day</title><link>http://msinfluentials.com/blogs/jesper/archive/2007/07/10/blocking-the-firefox-gt-ie-0-day.aspx#6567</link><pubDate>Thu, 12 Jul 2007 16:54:07 GMT</pubDate><guid isPermaLink="false">91db4bc3-5a69-4a9f-94bf-eedb569902ab:6567</guid><dc:creator>Dave</dc:creator><description>&lt;p&gt;&amp;gt; Now, one could argue that it would be nice if IE put some more restrictions on what it passed to a protocol handler, but not only is it difficult for IE to make decisions regarding what third-party plug-ins get to see,&lt;/p&gt;
&lt;p&gt;If we assume that the URL handling mechanism is supposed to be used for handling URLs, then applying URL escaping would seem to be the obvious choice, no?&lt;/p&gt;
&lt;p&gt;&amp;gt; to put those restrictions on third party developers after the fact is even worse.&lt;/p&gt;
&lt;p&gt;Yes, that&amp;#39;s true. &amp;nbsp;Hopefully applications that handle URLs support the proper escaping methods, but that&amp;#39;s probably wishful thinking.&lt;/p&gt;
&lt;p&gt;&amp;gt; The simplest is probablynto change the protocol handler to invoke &amp;quot;firefox.exe -protocolhandler&amp;quot; &amp;quot;%1&amp;quot;.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s more or less what Mozilla&amp;#39;s workaround does: &lt;a rel="nofollow" target="_new" href="http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&amp;amp;module=all&amp;amp;branch=HEAD&amp;amp;branchtype=match&amp;amp;dir=&amp;amp;file=&amp;amp;filetype=match&amp;amp;who=&amp;amp;whotype=match&amp;amp;sortby=Date&amp;amp;hours=2&amp;amp;date=explicit&amp;amp;mindate=2007-07-10+22%3A59%3A00&amp;amp;maxdate=2007-07-10+22%3A59%3A59&amp;amp;cvsroot=%2Fcvsroot"&gt;bonsai.mozilla.org/cvsquery.cgi&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msinfluentials.com/aggbug.aspx?PostID=6567" width="1" height="1"&gt;</description></item></channel></rss>