Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Cross-Platform Java Sandbox Exploit

Posted by timothy on Wed Nov 24, 2004 08:22 AM
from the suck dept.
DrWho520 points out this report at silicon.com which begins "A flaw in Sun's plug-in for running Java on a variety of browsers and operating systems could allow a virus to spread through Microsoft Windows and Linux PCs. The vulnerability, found by Finnish security researcher Jouko Pynnonen in June, was patched last month by Sun, but its details were not made public until Tuesday." The hole affects Linux and Windows.
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by johnhennessy (94737) on Wednesday November 24 2004, @08:33AM (#10908312)

    I think this tries to highlight another reason why allowing a third party review your code is a good thing

    Generally, the most cost effective way can be an open source model.(there are others !)

  • by Cyphus (818873) on Wednesday November 24 2004, @08:38AM (#10908340)
    Its the browser-based sandbox that's the culprit here, not Java. Saying its a problem with Java, is like saying an IE exploit is a problem with HTML.
    • by jeif1k (809151) on Wednesday November 24 2004, @08:59AM (#10908461)
      Browsers aren't responsible for sandboxing plugins--in fact, they couldn't do it if they wanted to. Sandboxing is exclusively a function of the language and its runtime, in this case Java. If Sun's Java plugin allows the execution of dangerous code by untrusted code, it is Sun's fault. Note also that this is not the first time that this has happened.

      Fortunately, the solution is simple: just turn off Java applets in your browser. These days, you won't be missing anything important on the web by doing so.
        • > But sandboxing is not a function of the language - it is solely a function of the runtime.

          Pedant alert. In this case, ignorant pedant alert. the runtime is the Sun(R) Java(tm) Runtime Environment(tm), and Sun has lawyers who will do bad things to you if you claim the Java moniker does not apply to the JRE (which includes plugins for several popular browsers). Cue "Java is a platform" blather from Sun execs.

          In this case, they are simply being hoisted on their own petard. It is a bug in Java. The Platf
          • Yes, it's a vulnerability in the Sun implementation of the Java platform, but not Java the language or the Java platform generally.

            There are other Java runtimes, which are allowed to use the name Java because they pass the conformance tests (such as IBM's Java runtime), they would not be vulnerable to this exploit.
  • Opera not affected (Score:3, Informative)

    by TheJavaGuy (725547) on Wednesday November 24 2004, @08:40AM (#10908353) Homepage
    This bug affected IE and Firefox, but not the Opera Browser [opera.com].
  • by fforw (116415) on Wednesday November 24 2004, @08:40AM (#10908356) Homepage
    This only affects the Java plugins in the 1.3 and 1.4 Java release. The current java release 1.5/5.0 is not affected at all.

    And it's a java plugin vulnerability so a website running java on the serverside is not affected.

  • by Xpilot (117961) on Wednesday November 24 2004, @08:43AM (#10908371) Homepage
    From the Sun website:

    "...through JavaScript calling into Java code, including reading and writing files with the privileges of the user running the applet."

    A unix-like OS like Linux is somewhat safer than Windows, as one user account compromised doesn't trash the stuff that user doesn't have read/write permissions on (such as root or other users). So it's possible to contain on Linux, but on Windows... people usually run as Administrator.

    • A unix-like OS like Linux is somewhat safer than Windows, as one user account compromised doesn't trash the stuff that user doesn't have read/write permissions on (such as root or other users). So it's possible to contain on Linux, but on Windows... people usually run as Administrator.

      That is absolute misinformation. How are the two any different?

      I run as root and as Administrator because i'm too lazy to set up actual, proper permissions and accounts. That doesn't mean that I couldn't, just that I do

  • by scatter_gather (649698) on Wednesday November 24 2004, @08:45AM (#10908376)
    Write once, exploit everywhere!
    :)
  • by mrchaotica (681592) on Wednesday November 24 2004, @08:53AM (#10908417)
    Is the Java that comes on Macs exploitable by this too? (Maybe not, since Apple might have changed something, but I don't know)

    Also, what about BSD?
    • Mac (Score:4, Informative)

      by JavaLord (680960) on Wednesday November 24 2004, @11:44AM (#10909785) Journal
      I tested my PC, which the sample code worked on, but it didn't seem to work on my mac which runs OSX 10.3.6 in safari or firefox. Safari comes back with a "Class undefined" and firefox just seems to ignore the javascript alert at the end.

      Anyone else try this on the mac and have similar results?
  • by Anonymous Coward on Wednesday November 24 2004, @08:56AM (#10908443)
    From the horses mouth right here [jouko.iki.fi]. The issue is actually with the plug-in, not Java itself. In brief, you can load a Java class in an applet via JavaScript using getClass().forName() and use that reference to make calls outside the confines of the sandbox.
  • by jeif1k (809151) on Wednesday November 24 2004, @08:56AM (#10908444)
    The "sandbox" that cordons off Java applets from the rest of the system has typically worked well.

    When Java first came out, people found lots of security problems with its sandbox; there were both fundamental flaws in Java's type system and problems in Sun's implementation. That aspect of Java was subject to intense scrutiny back then because Sun had positioned Java as a new way of delivering client applications, which depended critically on sandboxing. The vision was that Java would replace heavy desktop apps.

    These days, it doesn't matter much anymore: Java has failed to achieve its goals on the client; you can browse perfectly fine with applets disabled and never even notice. And for Java's current server side uses, sandboxing isn't really that important. So, people stopped finding flaws in Java's sandbox because they stopped looking--it just doesn't matter to anyone anymore.

    I think Java's original vision of a thin client platform for high-quality applications delivered through the Internet is still relevant, but Java won't be able to fulfill it anymore: it has become too bloated and too complex. More likely, that niche will be filled by an updated version of Flash (yuck), XUL, or, perhaps, something entirely new.
  • No patch (Score:3, Interesting)

    by roman_mir (125474) on Wednesday November 24 2004, @08:57AM (#10908452) Homepage
    There is no patch, there is only the next release of the JRE, why is that? Wouldn't it make more sense to also release an executable patch rather than forcing a 14MB download (not that I care, I download it at 400KB/s?)
  • by bratboy (649043) on Wednesday November 24 2004, @08:59AM (#10908459) Homepage
    I'm sorry, but the comments here are getting a little absurd. The Java sandbox has had how many security exploits discovered in the eight or nine years it's been around? Perhaps there have been a couple, but I can't remember any. And now, a flaw is discovered by an independent researcher, a patch quickly released, and the bug made public only after a significant amount of time has passed for people to upgrade, and before an exploit appears - and you're complaining because ...? Oh right, because Java isn't open source.

    Open source, although a wonderful thing which should be given away at school bake sales, church meetings, and nascar rallies, is not a silver bullet. Case in point - the Firefox browser (which I use and love) has already had several security flaws (e.g. the same JPG flaw as IE) for which exploits have been released. The major reason we don't see more is *not* because it's so much more robust [enterpriseitplanet.com] - it's because it still doesn't have the visibility and marketshare of IE, not to mention the raw hatred of ubergeeks around the world. I know, I know - the marketshare is going up, and as a faithful user I'm honestly torn. I'd love for it to be successful, and for Microsoft to have some kind of competition, but for now, Firefox is pretty safe. Give it the marketshare, and watch all those 2600-loving eyes start reappraising their goals.

    daniel

      • by prandal (87280) on Wednesday November 24 2004, @09:47AM (#10908842)
        I don't think the open-sourceness or not of an application is the relevant issue.

        Consider three email clients for home users of Windows:

        Outlook Express - proprietary, bundled, and happily executes malware without a thought (and aids in social engineering attacks by hiding file extensions), insecure by design

        Pegasus Mail - proprietary, free, but not open source. Never excecutes anything unless explicitly told to, secure by design.

        Thunderbird - open source, secure by design.

        Design's the key, not the platform.

        But things aren't helped by idiotic PC games and applications requiring users to have administrative rights in order to play them (The Sims, The Sims 2, for example - it even says so on the box).
  • Unix Viruses ? (Score:3, Interesting)

    by anux (834169) on Wednesday November 24 2004, @10:05AM (#10908999)
    I have always found the idea of viruses on Unix amusing. I mean, any user can cause damage to his/her files, either manually or by running a script or binary. But this is not an "infection" as the system is left completely untouched. What worries me though is the way the news sites report "Linux viruses". Someone unfamiliar with Linux/Unix might think: "Oh! So Unix also has viruses, just like Windows." This I think is giving a completely wrong impression about Unix to such people.
  • by freelunch (258011) on Wednesday November 24 2004, @10:09AM (#10909033)
    Browsers should allow you to configure java and javascript on a per site basis. Much like you can allow pop-ups from certain sites.

    I prefer to have javascript off all the time.

    Being able to selectively enable them for certain sites would be nice and would improve security.

    • by fforw (116415) on Wednesday November 24 2004, @08:47AM (#10908387) Homepage
      ...If java is really just as bad as ActiveX
      no.

      This the only cross plattform security issue known. and it's a theoretical one, no exploits known.

      One failure in a secure sandbox environment is still not as bad as an environment where any code is executed and the security consists of the developer saying:

      "I don't think I built in something harmfull and sign that belief with this digital signature"

        • It is not exactly a failure of the secure sandbox environment. If you were running a standalone Java application or a Java Web Start application in the sandbox this hole wouldn't apply. This hole applies to the _C_ code that manages the Java plug-in.

          Well.. the result of this vulnerability is a circumvention of the sandbox environment ( not in C code but via Javascript [idefense.com] ). You may argue that the sandbox in itself has not failed which is formally correct, but a hacker shouldn't be able to circumvent it vi

    • by owlstead (636356) on Wednesday November 24 2004, @08:47AM (#10908390)
      There are differences. This is a bug in the security implementation of Sun. That's bad, since it goes for every platform. However, this is a single bug. With active X, you are in problems if there is a bug in *any* ActiveX component that is safe for scripting. So the target is way smaller with Java. Obviously that also makes it possible to vigourously (no spell check available - dang) test that part, so no excuse for Sun for not doing that.

      Note that there are very few security notifications with Java. I can remember a few buffer exploits in the VM (not in the Java applications itself, that's impossible, unlike active X). Java makes it much easier to write secure code. So the chance on serious bugs occuring is smaller (bugs tend to be in the design, not so much in the implementation). But it is definately not a holy grail, mistakes can be made as you can see.

      So is it a serious bug: answer YES. Does that make Java (/.NET managed code) a bad idea: NO. Do you need to upgrade: certainly. Is java as bad as ActiveX in the browser: definately not.

      • by rdc_uk (792215) on Wednesday November 24 2004, @08:50AM (#10908403)
        " There are differences. This is a bug in the security implementation of Sun. That's bad, since it goes for every platform."

        What you should have really noted was that this is a bug in the security implementation of java. Which is bad.

        ActiveX, on the other hand, doesn't HAVE a security implementation in which to get such a bug, which is terminally bad.
          • " Lets make a deal: it is a bug in the security implementation of Java by Sun. Sheesh. That's what I said, didn't I?"

            I think you read an implied slur into me simply having chosen to use the word "java" instead of "sun" when paraphrasing instead of actually quoting you. None was intended.

            On to the point; as I recall the 2 main problems with ActiveX security are:

            1; the browser (IE being _the_ ActiveX browser IIRC) pushes "security" options such as "allow signed scripts to run". Johnny Hacker is quite capab
    • by Lethyos (408045) on Wednesday November 24 2004, @09:29AM (#10908711) Journal
      Makes me wonder if Java is really just as bad as ActiveX

      Who the hell moderates stuff like this as "insightful". I don't have any exact numbers in front of me (nor will I spend the time to find them), but I can safely tell you that over their respective lifetimes, ActiveX has suffered many orders of magnitude more exploits than Java ever will. The only meaningful caveat I can think of to this statement is the "default" Java runtime environment (that used to be) packaged with Internet Explorer that is written by Microsoft. Of course, you can hardly attribute any problems with that to Java because Microsoft built it on top of ActiveX and took very little interest in security when doing so.

      Also, I should point out that any of theoretical exploits will have the most damage on Windows than other platforms because Windows is insecure. It seems that any code running on a Windows box has, one way or another, unbridled access to resources that should be above the user's privileges, but that's an entirely different situation altogether...

      • by ttfkam (37064) on Wednesday November 24 2004, @11:51AM (#10909827) Homepage Journal
        Exactly! And another aspect that people can't seem to wrap their heads around is the lack of confirmation windows in Java client-side. Sure a signed applet that will be accessing the local filesystem or connecting to an arbitrary server on the net will pop up a dialog box as it should, but normally it just starts up and runs.

        ActiveX pops up a dialog box at every new instance on every site. The user ends up thinking, "Oh, another damned popup," and just clicks on it. It's like email and dealing with spam. There are so many junk emails, eventually you make a mistake accepting one you shouldn't have or dumping one that you would have wanted.

        With the Java applet sandbox, only actions that are potentially dangerous require a confirmation dialog, and 99.9% of all applets do not need signing. Sure, today Sun announced a vulnerability. That makes how many in the last ten years? Seriously, compare that number with the number of exploits in basically any network-aware program in any language. Dumping Java over this is like refusing to go out to restaurants anymore because a friend of a friend got food poisoning.

        You want to be absolutely safe, unplug your network or modem cable. There you go. Absolute network safety. Life is a compromise.
      • by I confirm I'm not a (720413) on Wednesday November 24 2004, @08:31AM (#10908304) Journal

        ...Or better, since Java runs in a (relatively) secure sandbox. It's worth noting, from the article [silicon.com], that there hasn't to date been a single Java virus. This is bad, but it has to get a lot worse before comparison with ActiveX is warranted.

          • by I confirm I'm not a (720413) on Wednesday November 24 2004, @08:52AM (#10908415) Journal

            > > hasn't to date been a single Java virus.
            > ...that we know about...

            True, and it's worth noting that the quote I offered above came from Jonathon Schwarz, who - just possibly - might be biased. I'm still inclined to trust a platform with no visible viruses than platforms with very obvious viruses. Put another way, I'm in no hurry to locate a browser that supports ActiveX.

    • by DaEMoN128 (694605) on Wednesday November 24 2004, @08:43AM (#10908366)
      There are already proof of concept viri that work on both linux and windows.
      http://antivirus.about.com/library/weekly/aa032801 a.htm/ [about.com]
      http://www.itworld.com/AppDev/1312/IWD010328hnvirl in// [itworld.com]
      looks like this has been happening since 2001 according to the itworld article (look at the date in the upper left hand corner.)
      the only thing that has changed is the vector of infection. There was also a /. article if i remember right, but i can't seem to get the right search terms to find it.
        • by Cereal Box (4286) on Wednesday November 24 2004, @10:42AM (#10909299)
          so in Linux it can "only" trash the user's home directory.

          I think a lot of Linux zealots tend to downplay the importance of the home directory. After all, if you're a smart user and don't run as root, all your important data is going to be in the home directory (and possibly other directories where your user has permissions). I could care less if the OS install gets wiped out -- that can easily be replaced. The data in my home directory can't. In that regard, losing your home directory is just as bad as losing the entire system.
          • by fforw (116415) on Wednesday November 24 2004, @10:52AM (#10909379) Homepage
            I think a lot of Linux zealots tend to downplay the importance of the home directory. After all, if you're a smart user and don't run as root, all your important data is going to be in the home directory (and possibly other directories where your user has permissions). I could care less if the OS install gets wiped out -- that can easily be replaced. The data in my home directory can't. In that regard, losing your home directory is just as bad as losing the entire system.
            The home directory normally only includes data and settings. It's not fun if you lose data ( if it's important data you should have backups ), but it's worse to have a system compromise where the attacker can control your system, install backdoors to use your system for every purpose he can think of and can even fry your hardware in some cases.
          • All of what you say is true, but you omit the possibility of a multi-user system. If a single user has non-root permissions he can only destroy his own data, not those of others.
          • by Mysticalfruit (533341) on Wednesday November 24 2004, @11:29AM (#10909668) Journal
            Your totally right. Here's how you solve the problem.

            1. Create a seperate user called "webuser". Thus when some stupid java exploit attempts to delete your home directory, it can't.

            2. configure your selinux security so that the JIT can't create/delete stuff except inside of a "java temp" directory. Fine let the virus go wild, too bad it won't get anywhere.

            3. Impliment a sensible backup plan. What's really important for you to backup? Software can generally be downloaded again. The only stuff that's not replaceable is code and settings.
    • Re:At least... (Score:5, Insightful)

      by rdc_uk (792215) on Wednesday November 24 2004, @08:47AM (#10908388)
      The "patch before admitting the problem" thing DOES happen on Windows.

      But when it happens on windows it is microsoft "covering up their vulnerabilities".

      Apparently, for you, when someone else does it they are doing something good...

      Security by Obscurity, no matter who does it, it is still bad. Just because the WHOLE WORLD didn't know about it, doesn't mean some virus writer didn't; it just meant everyone continued to use un-patched Java installs in blissfull ignorance of the risk.
      • Security by Obscurity, no matter who does it, it is still bad. Just because the WHOLE WORLD didn't know about it, doesn't mean some virus writer didn't; it just meant everyone continued to use un-patched Java installs in blissfull ignorance of the risk.

        You're saying that vulnerability details should be announced before patches are completed? I'm afraid I disagree. There's a fair bit of evidence (see stories here [computerworld.com] and here [bbc.co.uk]) that black hats are using vulnerability announcements and patches to find exploi

    • Looks like you left out the word not:

      The nice thing is, is that if you are using Linux, Java is most likely not running as root, and therefore less likely to mess around with your OS, Or files which that user does not have access to. Therefore, it's probably hard to get something into a startup script, and to create a virus that would be around after you rebooted the computer.

      :)

    • I just downloaded 1.4.2_06 from Sun's website. Go to java.sun.com and look for J2SE. You can get both 1.4.2_06 and 1.5 there, on the page. I didn't use the automagic update, myself, so I don't know what's going on there.
      • Wow, that's worse than I've seen.

        The worst problem I've had was writing a commercial app that had a Java frontend. Because Sun kept making seemingly random changes to the API and not fixing bugs (or worse, breaking the bugs that they fixed on the last version) we were stuck with 1.3.1-05 almost right until the java code was abandoned (went to c# - we only supported Windows servers anyway).

        One customer wanted a 1.4.0 release, which we duly did (required a special fork and about a month of developer time)
      • You sir are reacting like an idiot. You list applications that do not work and then blame the language. Blame the application writers, not the language. This is like saying "C++ sucks, look how buggy and insecure windows is, C++must be to blame, not the developers." Thanks then post.
        • You sir are reacting like an idiot.

          Thanks!

          You list applications that do not work and then blame the language. Blame the application writers, not the language.

          I don't have an issue with the language. Its the buggy runtime environment (jre) that I have an issue with. The language has many good features. From what I understand, its one of the best languages to program in. But since the jre is so finicky and broken, its not worth it to use the language, no matter how good it is.

          Another issue that I h