Slashdot Mirror


Open Source Firm Releases Patch for IE Bug [UPDATED]

An anonymous reader writes "An open source and freeware software development web site has released a patch to fix the URL spoofing vulnerability in Internet Explorer, which can be exploited by scammers who try to trick people into revealing details of online banking accounts or other private information." Naturally, the source for the patch is available as well. Update: 12/19 15:06 GMT by M : Sadly, the patch appears to contain a buffer overflow and some possibly-malicious code - see an analysis and news story, and this comment which suggests the patch author is trying to figure out who is taking advantage of the original vulnerability. Caveat patcher.

27 of 544 comments (clear)

  1. DMCA violator by DigiShaman · · Score: 5, Insightful

    In other news....M$ slams a DMCA lawsuit for "hacking".

    --
    Life is not for the lazy.
  2. No Trusted Computing logo on patch? by Anonymous Coward · · Score: 5, Funny

    I'm not downloading anything that isn't part of a MS plan. Sounds like a trojan attempt to me.

    1. Re:No Trusted Computing logo on patch? by Anonymous Coward · · Score: 5, Funny

      Did you know that MS are now sending out these patches direct via email? Be sure to install it when it arrives.

  3. How were they able to make such a patch... by znode · · Score: 5, Interesting

    Without the original source to IE?

    1. Re:How were they able to make such a patch... by KFK+-+Wildcat · · Score: 5, Informative
      It only redirects if the address seems like it contains illegal caracters (and thus tries to spoof the address), not for all webpages accessed.

      See http://www.openwares.org/cgi-bin/exploit.cgi?slash dot.org&www.goatse.cx for instance.

      It might log the addresses attempting to spoof webpages, but I'm all for that. And at least this explains clearly that a spoof was attempted through this exploit. I think it's better than just correcting the string, which would access a spoofed webpage anyways, even if showing the right address at the top... which of course would not work as well but many would still fall for it no matter, especially since it probably would look like http://www.paypal.com@paypal.something.net/ which would seem legitimate to the casual looker.

    2. Re:How were they able to make such a patch... by netsharc · · Score: 5, Informative

      Wrong. :) The URL I found in the source code is http://www.openwares.org/cgi-bin/exploit.cgi? .. try it with http://www.openwares.org/cgi-bin/exploit.cgi?slash dot.org. It's the error page that the program displays when it hits a probable exploit. The program does the checking in your computer and when the link doesn't have %00 or %01, it just shows it normally. Only when it does see a %00 or %01, it sends the link to the above mentioned page.

      If you ask me, maybe they want to have a record of which evil Paypal clone-sites are taking advantage of the exploit so they can tell the cops. Maybe they want to make it easy to tell the users that "MS has issued an update for this problem, please download it!", but of course maybe they want to display ads on that error page (Heh I would do the same).

      But no, URLs that are okay are not being sent to that site.

      --
      What time is it/will be over there? Check with my iPhone app!
    3. Re:How were they able to make such a patch... by crapulent · · Score: 5, Informative

      From looking at the source it's not actually a patch so much as a 'wedge'. It creates a typelib (or COM object of some sort) that registers itself with the system. By doing this it hooks into the IE API, such that it is called every time a URL is visited. If it detects that the URL contains the spoof, it redirects you to their site, where a CGI script gives you an IE-error-like page: For example if the faked part of the URL was 'fake.com' and the real site was 'real.com' it would redirect you to http://www.openwares.org/cgi-bin/exploit.cgi?true. com&http://fake.com

      So this is not so much a patch as a 'workaround'. It doesn't fix anything, it just intercepts those URLs and warns you about it.

  4. New MS Security Fix by Ironclad2 · · Score: 5, Funny

    This patch fixes a security bug in Internet Explorer that could allow someone who actually knows what they're doing to repair buggy programs on your computer.

  5. And this matters why? by Anonymous Coward · · Score: 5, Insightful

    So, there is an open source patch for a browser that the people that would have heard of the patch wouldn't use, the /. readers ought to be using mozilla and they know it, if they aren't using mozilla they probably will not install the patch either.

    the people that would likely be fooled by this haven't heard of mozilla and haven't heard of open source and will not hear of this patch.

    so this patch is pointless
    (cool that it can be done though)

  6. What the "patch" really does.... by mikewren420 · · Score: 5, Funny

    What the article doesn't say is that the "patch" just removes IE and installs Mozilla. :)

  7. Re:Seriously. by 56uSquareWave · · Score: 5, Insightful

    Ahem you cant see the source code of IE but you trust that? okay then

    --
    - meta language used, please apply your own spelling and gramma
  8. No thanks by Anonymous Coward · · Score: 5, Funny

    Sorry, but its going to be a cold day in hell when I run something from a website named "openwarez.org".

  9. Mmf. by BJH · · Score: 5, Informative

    It's only "open source" in the very loosest sense. From the patch:

    Internet Explorer URL Spoofing Security Patch

    Developed by Opensoft Corporation, Vanuatu

    Contact: opensoft@openwares.org

    Opensoft Corporation, Vanuatu
    Copyright 2003 All rights reserved.

    Terms of Agreement:

    By using this source code, you agree to the
    following terms:

    1) You may use the source code, resource
    files for educational purposes only.
    2) You MAY NOT redistribute this source code
    without written permission. Failure to do
    so is a violation of copyright laws.
    3) The author of this code may have retained
    certain "additional copyright rights".
    If so, this is indicated in the author's
    description.

  10. Re:Acceptance? by DavesWorld334 · · Score: 5, Insightful

    Pretty sure this makes Microsoft look really inept. I mean, if the largest and richest software company in the world can't patch their own products before a group of volunteer coders can figure out a fix ... seems to me that makes M$ look like fools.

    My US$0.02, unadjusted for inflation of course.

  11. In other news... by BladeMelbourne · · Score: 5, Funny

    Open Source Firm Releases Patch for IE Bug

    In other news...

    Today Micro$oft contributed code to the Linux kernel, and announced plans to help iron out differences between Mozilla and MSIE :-)

  12. Re:did anyone else feel it... by WolfWithoutAClause · · Score: 5, Funny
    Will microsoft actually have to acknowledge them?

    Yes, of course! The subpoena will mention them by name.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  13. I wouldn't call this a patch... by goranb · · Score: 5, Insightful

    Judging from the source it's a quite simple COM object, which hooks into IE and checks URLs before IE actually starts "processing" them (opening connections, parsing...)
    If it finds anything out of the ordinary (like an exploit) it just redirects IE to their own site. Specifically to http://www.openwares.org/cgi-bin/exploit.cgi. It adds a few paramters (the fake url among other), so I guess they will be building a database of exploiters...

    It's no patch, IE stays as it is. It's more a workaround. I'm not sure whether these hooks are documented (allthough being a windows system programmer I never liked IE and stayed as far away from it as possible), but if yes, Microsoft might actually have nothing on openwaves...

  14. Re:... huh? by Niten · · Score: 5, Funny

    If this patch gets the press coverage that it deserves, maybe people will learn to take Microsoft's claims of better security response rates than those open-source folk, with a grain of salt.

    Or maybe Microsoft will actually start working harder to keep their software secure in a timely manner?

    </fingers_crossed>
  15. The time problem has nothing to do with the patch by SonicBurst · · Score: 5, Insightful

    The time it takes to patch the problem is miniscule compared to the regression testing done to make sure the patch fucks up as little as possible. They test EXTENSIVELY and even so you still get the occasional patch that interacts with other software and ways you can't predict and breaks something. It happens. Any code monkey could hack out a patch, but I know damn well they haven't tested this as much as a corporation supporting 90% of the world's browser users would. That's where the time is, so quit bitching about how long it takes to release a patch. Now, the time it takes to ACKNOWLEDGE a bug is a different story....

    --

    Geek used to be a four letter word. Now it's a six-figure one.
  16. Re:How about this one .... by CaptBubba · · Score: 5, Interesting
    I actually don't see any mention of the GPL on any of the pages, or in the downloadable source.

    Doesn't this mean that nobody else is allowed to distribute it? I mean, MS could still get in a whole lot of trouble for inclusing this code in its patch, but they wouldn't risk losing source code.

  17. Re:Inept and free! by lurker412 · · Score: 5, Funny

    Yeah, patch Q824145. In my case, it turned out to be a blessing. I got so pissed off that MSFT broke standard UI scrolling behavior that I switched to Firebird. I don't understand how a large, successful software company can do such sloppy QA and think that nobody will notice. But then, there are many things that I don't understand.

  18. This "patch" leaks memory - and other bad stuff by bighoov · · Score: 5, Informative

    A list of the bad things about this "patch", just at first glance:

    1. Leaks 256 bytes on every URL navigation
    2. Leaks 512 additional bytes if it finds an exploit URL
    3. Creates a string with the \1 char in it on every call, but does nothing with it
    4. Will overwrite stuff on the stack if the URL has the exploit and is very close to 256 chars in length.

    It's a good thing these guys aren't on the real IE dev team.

  19. RTFC by b17bmbr · · Score: 5, Informative

    if you'd have taken a few minutes (or seconds w/broadband) to get the source and look at the code, you'd see this:

    By using this source code, you agree to the following terms: 1) You may use the source code, resource files for educational purposes only. 2) You MAY NOT redistribute this source code without written permission. Failure to do so is a violation of copyright laws. 3) The author of this code may have retained certain "additional copyright rights". If so, this is indicated in the author's description.

    since i doubt there'd be anything educational about IE source code...and by the way, i don't think this qualifies as an open source license.

    --
    My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
  20. Do Not Use It-It's Got a Huge Vulnerability Itself by DmitriA · · Score: 5, Informative
    For one thing, it's an IE add-on (similar to a GoogleBar and others), not a patch. So it's a messy solution to begin with.

    On top of that, it's buggy. It has a memory leak in its BeforeNavigatorEvent() IE callback function which gets triggered before a loading of each new page. There they allocate a string of 256 bytes, but never even bother to clean it up!
    I'm not even sure if that memory is going to be cleaned up when you close all the IE windows, since it's really a Windows system component and this DLL may not be unloaded even with the closing of IE. But I may wrong that point...

    But even that's not the worst thing. Their code actually contains a buffer overflow, allowing the attacker to execute code on your machine with the privileges of the IE process just by crafting an invalid URL link and getting you to click on it!

    Basically, they use WideCharToMultiByte() to convert the unicode URL string to that allocated 256-byte ASCII character array. They tell the function the size of their array, but if the URL string exceed 256 characters in length, it will not overwrite that buffer and cause an immediate buffer overflow. Instead it will fail and tell you to increase your buffer. Well, guess what? They don't check for that failure condition (and, incidentally, it may fail for many other reasons during the Unicode->ASCII conversion) and happily proceed to use it in a strcpy() later on, overwriting another 256-byte character array which is now located on the stack. A nasty buffer overflow just waiting to be exploited...

    So to summarize, they took a relatively minor problem (URL spoofing) and made it a hundred times worse with their 'solution'. Great job, guys!

    Offending code:
    /* memory leak */
    char *dest = (char *)malloc(256*sizeof(char));

    /* Unicode->ASCII conversion that doesn't do error checking */
    WideCharToMultiByte( CP_ACP, 0, BSTR)url->bstrVal, -1, dest, 256, NULL, NULL );

    ...

    /* vulnerable arrays on the stack */
    char sFake[256];
    char sTrue[256];

    ...

    /* please overwrite the return address on the stack and execute my shellcode */
    strcpy(sFake,strstr(dest,"\2") +1);
  21. Re:Do Not Use It-It's Got a Huge Vulnerability Its by DmitriA · · Score: 5, Informative

    Eh. Just realized that since WideCharToMultiByte() will fail, it will not actually copy the URL to the dest[] array and thus, you probably can't overwrite the return address with a legitimate value and get it to point at your shellcode. It's still easy to overwrite it with a random value (with whatever is sitting at the time in the uninitialized dest[] array) and cause a crash, but executing malicious code may be a little harder to pull off...

  22. Re:How about this one .... by jujitsustab · · Score: 5, Insightful

    Why would Microsoft use this code in their patch ? This patch code is based upon readily available IE com interfaces which allow addon IE programs to interact with browser operations. In fact, this patch simply checks the url for the vulnerability every time you navigate to the page. If the vulnerability is found it instead naviagtes to: http://www.openwares.org/cgi-bin/exploit.cgi?A&amp ;B where A is the spoofed url and B is the actual url. Microsoft would fix this vulnerability in the actual IE code, not in a bolted on module like this.

  23. Re:Hey, morons by Anonymous Coward · · Score: 5, Interesting

    hmm...
    In ::BeforeNavigateEvent (IETray.cpp)
    It copies the string to a MBCS buffer, and scans for %01, %02, and %DA. If none of these exist, the rest of the function is skipped. Don't see how this phones home.

    Of course, the strings is malloc()ed but never free()ed... But that's another matter. That and for some reason they don't just use all-unicode (use wcsstr() etc.)... What if I wanted to surf to a site with a character that is not in the current code page? (e.g., search for Japanese text on Google using an English O/S) (Note that IE has the option of always sending the URL in UTF-8, so it has to be able to deal with characters not in the ACP)