On CBS.com: Watch Exclusive CSI Cross Over Video
BNET Business Network:
BNET
TechRepublic
ZDNet

July 10th, 2007

UPDATED: Command injection flaw found in IE: Or is it Firefox?

Posted by Ryan Naraine @ 6:53 am

Categories: Apple, Botnets, Browsers, Data theft, Exploit code, Firefox, Google, Hackers, Metasploit, Microsoft, Mozilla, Open source, Passwords, Patch Watch, Pen testing, Responsible disclosure, Rootkits, Spam and Phishing, Spyware and Adware, Symantec, Viruses and Worms, Vulnerability research, Windows Vista, Zero-day attacks

Tags: Malicious Code, HTML, Attacker, Microsoft Internet Explorer, Attack, Flaw, Microsoft, Ryan Naraine

[ NOTE: See update below on confusion over whether this is an IE or a Firefox vulnerability ]

Microsoft’s Internet Explorer browser is vulnerable to a protocol handler command-injection vulnerability that could allow malicious code attacks with limited user action.

According to a warning issued by hacker Thor Larholm, the issue is an input validation flaw similar to the one he discovered in Apple’s Safari for Windows browser .

[It] allows you to specify arbitrary arguments to the process responsible for handling URL protocols.

The bug could effectively allow remote attackers to pass and execute arbitrary commands and arguments through the ‘firefox.exe’ process.

[ SEE: How to configure Internet Explorer to run securely ]

A successful attack requires that the user is tricked into clicking on a link on a rigged Web site or in an HTML e-mail.

Researchers at Symantec have detailed the following attack scenarios:

  1. An attacker constructs malicious HTML to influence command-line parameters for the external application that will run when a URI is loaded.
  2. The attacker embeds the malicious HTML code in a webpage or sends it through HTML email.

The malicious code may be automatically loaded when the page or HTML email is rendered. User interaction is required as they must follow a link to a malicious site or open a malicious email.

Click here for Larholm’s proof-of-concept which demonstrates the vulnerability.

[ UPDATE: July 10, 2007 @ 12:19 PM ] Security researchers are in disagreement over whether this is a vulnerability in IE or Firefox. Larholm and Symantec’s DeepSight researchers insist it’s a bug in the way IE validates certain inputs but Secunia’s research team claims this is a Firefox issue.

Secunia CTO Thomas Kristensen sent me the following via e-mail:

To avoid any possible confusion, I just wanted to let you know that Secunia - as always - have tested and analysed the alleged zero-day in IE that was reported earlier today.

This is in fact NOT an IE issue - it is a Firefox issue.

Since Firefox 2.0.0.2, a new URI handler was registered on Windows systems to allow websites to force launching Firefox if the “firefoxurl://” URI was called (like ftp://, http://, or similar would
call other applications).

However, the way in which the URI handler was registered by Firefox causes any parameter to be passed from IE (or another application) to Firefox when firefoxurl:// is activated. Due to the implementation of the “-chrome” parameter, it became possible to inject code that would be executed within Firefox.

Running JavaScript in “chrome” context within Firefox is essentially the same as executing arbitrary code and allows an attacker to take any actions on the local system with the same privileges as the active user.

Registering a URI handler must be done with care, since Windows does not have any proper way of knowing what kind of input potentially could be dangerous for an application (i.e. how should Windows know that the string “-chrome” could be dangerous for Firefox?).

Windows will only filter certain non-application specific meta characters; anything that is specific for the application called by the URI handler must be handled by the application itself.

Improper usage of URI handlers and parameters supplied via URIs has historically caused problems for many vendors including, Microsoft, Apple, Mozilla, certain Linux projects, Opera, and others.

I’ve pinged Microsoft, Larholm and the folks at Mozilla to try to get to the bottom of this. Will update this post as necessary.

[ UPDATE: July 10, 2007 @ 2:08 PM ] Mozilla security chief Window Snyder comments:

“We are aware of this issue and we are developing a fix. Mozilla is committed to delivering the safest online experience for its users.”

This from the Microsoft Security Response Center:

Microsoft has thoroughly investigated the claim of a vulnerability in Internet Explorer and found that this is not a vulnerability in a Microsoft product.

Still waiting for word from Larholm…

Larholm’s response, sent to me via e-mail:

Internet Explorer and Firefox are both to blame. Firefox could have registered their URL protocol handler differently, for example with pure DDE, but IE is still to blame for not escaping ” (quote) characters.

The latter can be evidenced by the fact that you can inject arbitrary arguments to a wide range of other URL protocol handler applications, such as irc:// (mIRC), aim:// (AOL Instant Messenger), hcp:// (Windows HelpCenter) and mms:// (Windows Media Player) to name just a few.

This is a generic flaw in Internet Explorer that has been left unpatched since at least 2004.

Ryan NaraineRyan Naraine is a journalist and security evangelist at Kaspersky Lab. He manages Threatpost.com, a security news portal. Here is Ryan's full profile and disclosure of his industry affiliations.


Email Ryan Naraine

For daily updates on Ryan's activities, follow him on Twitter.

Subscribe to Zero Day via Email alerts or RSS.

  • Talkback
  • Most Recent of 33 Talkback(s)
Mostly correct, except...
IE doesn't forget to do anything, that's the way the specification was written. In this case, IE handles it correctly, on the lightweight parsing end, rather than the suffering what is akin to a boxin... (Read the rest)
Posted by: Spiritusindomit@... Posted on: 04/29/09 You are currently: a Guest | | Terms of Use
Am I missing something here?  ye | 07/10/07
It is  Ryan NaraineZDNet Moderator | 07/10/07
I'm confused  mdemuth | 07/10/07
Me too  Ryan NaraineZDNet Moderator | 07/10/07
Official responses from MS and Mozilla  Ryan NaraineZDNet Moderator | 07/10/07
So why is Mozilla fixing the bug and not MS?  georgeou | 07/10/07
It's both  CobraA1 | 07/11/07
Because MS is slow to patch holes  Greenknight_z | 07/12/07
Um..  firehound | 07/10/07
Users are clueless?  Confused by religion | 07/10/07
If you had waited till the story .....  ShadeTree | 07/10/07
Yikes!!!  NonZealot | 07/10/07
Nice Statement, NonZealot  aldingtr@... | 07/11/07
I agree too  ahumeniy | 07/11/07
Yes, this is an IE vulnerability...  jasonp@... | 07/10/07
No, quite incorrect  mdemuth | 07/10/07
You don't get it, do you?  KTLA | 07/10/07
What company...  jasonp@... | 07/11/07
Not an IE bug, but a bug in ShellExecute  PB_z | 07/10/07
You hit the nail on the head  kokuryu | 07/11/07
This was Mozilla's fault.  osreinstall | 07/10/07
This pretty much proves...  lenohere | 07/10/07
Well...yes...  Cardinal_Bill | 07/10/07
Is IE the problem or just Symantic  Rndmacts | 07/11/07
Alternative view  Freebird54 | 07/11/07
As always, the Anti-Microsoft  c2tsales@... | 07/11/07
Okay, so...  Ginevra | 07/11/07
Not use IE?  Gpa's | 09/05/07
Guess I am lost  desamuelson | 07/11/07
My guess it is the OS that is the issue here.  phatkat | 07/11/07
Okay, folks, here's what's happening (more detailed)  CobraA1 | 07/11/07
Am I vulnerable?  Gpa's | 09/05/07
Mostly correct, except...  Spiritusindomit@... | 04/29/09

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement

Recent Entries

advertisement

Archives

Favorite Links

ZDNet Blogs

White Papers, Webcasts, and Downloads

SmartPlanet

  • Thought-provoking progressive ideas on diverse topics that intersect with technology, business, and life, and matter to the world at large. Visit SmartPlanet
  • More from IBM
  • Innovate your business' process model, play against the market, compete against others on our scoreboards and WIN! Try INNOV8 2.0: A BPM Simulator
  • Enabling Real-World Business Transformation through IBM Service Management Read the EMA Analyst Report
Click Here