Slashdot Mirror


Malicious Web Pages Can Install Dashboard Widgets

bonch writes "If you're running Safari on OS X Tiger and go to this website, a 'slightly evil' Dashboard widget will be automatically downloaded and installed and can't be removed without manually removing the file from the Library folder and rebooting the computer. The widget is called Zaptastic and is a demonstration by the author of how easy it is to exploit Dashboard for nefarious purposes. The essay, released under the Creative Commons License, goes on to describe the many ways users can be taken advantage of--imagine porn sites auto-installing adware widgets without your knowledge." So if you're on a Mac, it would be smart to view that page with something other than Safari.

52 of 610 comments (clear)

  1. yes but... by Anonymous Coward · · Score: 5, Funny

    magine porn sites auto-installing adware widgets without your knowledge.

    Yes, but do they install porn?
    -SJ53

    1. Re:yes but... by mike518 · · Score: 5, Funny

      "magine porn sites auto-installing adware widgets without your knowledge."

      i dont need to imagine, im running windows xp.

      --
      Mike
      I heart the RIAA & MPAA, im sure its mutual...
  2. Serves you right by th1ckasabr1ck · · Score: 3, Funny

    If people would just run a secure OS like Linux or Windows, they wouldn't be hit with attacks like this. When will people learn?

    1. Re:Serves you right by Janitha · · Score: 5, Insightful

      There is no such thing is a secure OS, all Operating systems have flaws.

    2. Re:Serves you right by EtherAlchemist · · Score: 4, Insightful


      That's quite apt. And I imagine you will be modded down due to the OS in question here.

      When a Windows OS exploit is discovered there are thousands of zealots who scream "USE LINUX, STUPID" and "I use a Mac, there are not exploits for my OS" but whenever either of those OSes is found to have a flaw, those zealots are awfully quiet.

      The best thing for me reading the comments so far has been the Mac users who point out that settings can be changed to allow or deny this action. They treat that like it's a magic feature only Mac has, when the truth of the matter is shit like that can be turned off in Windows also.

      All of the common OSes can be locked down tight, IF THE USER CHOOSES TO. Every OS ships with the potential to be exploited, and even if it comes out the box secure, the user can always undo that.

      I guess the difference when it's a Mac OS, it's a big deal because someone actually bothered to write something malicious for a small segment of the computer population.

      This is actually a good thing though. It's lets all of you Mac users know that the security you've been takeing for granted is only as good as long as their is no attention to you.

      Looks like this is changing.

      --
      R(k)
    3. Re:Serves you right by diamondsw · · Score: 4, Insightful

      No, because as you said, out of the box security is important. Mac OS X has no services running out of the box; Windows had several exploitable ones prior to XP SP2 (which I give them credit for doing a good job with).

      As for this vulnerability, it is Safari categorizing a Dashboard widget as "safe" when it clearly isn't. Yes, it's a vulnerability, one with an exploit already shown, and it needs to be fixed NOW. No one is saying Apple is perfect or OS X is immune, but so far there has been very little to point to in Apple's track record.

      What's really important is Apple's response. Anyone post this in RADAR yet? "As Seen On TV", any thoughts from your unique position?

      --
      I don't know what kind of crack I was on, but I suspect it was decaf.
    4. Re:Serves you right by teh+kurisu · · Score: 4, Informative

      No, it's Safari categorising a ZIP archive as safe. To quote Safari:

      "Safe" files include movies, pictures, sounds, PDF and text documents, and disk images and other archives.

      The ZIP archive extracts automatically, and just happens to place the file in ~/Library/Widgets/. Dashboard runs the Widget from there.

      You're right, it's not safe. I think the solution to this should be to first of all disable the whole opening safe files functionality by default. The second should be to declassify archive files as 'safe' (with the exception of disk images), because it makes it easy to write files in this way.

      Personally I've set administrator priveledges on my ~/Library/Widgets/ folder so that I now need to enter a password to write to it.

  3. widgets limited by RobertTaylor · · Score: 4, Informative

    this page at Apple's Developer Connection says that a 'widget' cannot ask for any resources or do anything to the filesystem outside of the widgets bundle.

    1. Re:widgets limited by ender81b · · Score: 5, Insightful

      True, true. But hasn't apple learned anything from MS? Automatically running/installing *anything* from the internet is a bad, bad idea. And a widget could, in theory, do things like make widget pop up ads, revolving goatse/tubgirl widget, etc.

      Basically, bad apple bad. Fix.

    2. Re:widgets limited by antibryce · · Score: 5, Interesting


      True, but widgets can run external programs if certain permissions are set. The most insane part is that the widget itself sets the permissions it's allowed to have. Putting a key in the Info.plist file with "AllowFullAccess" set to "Yes" will allow the widget to run anything, access the network, etc. Basically at that point it's a full featured app. How hard would it be to make a widget that's invisible but periodically queries Safari's browser history, or songs played in itunes, or do a spotlight search for "password" and email the results to some guy in Russia? The widget could even be invisible to the user, with a 1x1 transparent gif as it's screen.

      It seems really really dumb in this light to have Safari not only automatically download zip files, but uncompress them and if it finds a Widget bundle inside to install it. All without user intervention.

    3. Re:widgets limited by ender81b · · Score: 4, Insightful

      I meant they should fix it in not allowing an untrusted remote application to be downloaded on a local computer with no interaction from the user.

    4. Re:widgets limited by Arrgh · · Score: 4, Interesting
      It's not a bad idea per se to automatically download and run stuff from the Internet, but any software designed to do so had better be designed and implemented properly. The dozens (hundreds?) of "cross-site scripting" bugs that have surfaced in popular browsers in the past few years are evidence that this is rarely done well. Java's 10 year old sandbox design has been quite successful, and Flash has followed a substantially similar design.

      Unfortunately, code signing, as currently implemented and (mis)understood by users, is an all-or-nothing proposition. There are certainly legitimate uses for privileged mobile code, but most users don't really read or understand security warning dialogs, they just think "I just clicked the Start Game button, and now it's asking me if I really want to Start the Game. How stupid."

      Marimba actually came up with a good partial solution ages ago. When their framework loaded and executed a Java app, the framework would closely manage exactly what resources could be exploited by the app. Each application's ability to read and write files was restricted by default to its own tiny corner of the filesystem, and the amount of space it could occupy with its files was constrained as well.

      Note that Java's security manager infrastructure has allowed these sorts of fine-grained controls since 1.2 (circa 1998), but no one to my knowledge has yet found a way to effectively communicate to a user:

      • what resources a given piece of mobile code will want to exploit;
      • what the risks of running it might be;
      • some assurance that the code is published by someone they trust;
      ...While maintaining some degree of user-friendliness. It's a tough problem.

      MSIE's concept of local policies set according to centrally defined security zones was a step in the right direction; it's too bad its development stalled when the Browser War was "won."

  4. Too integrated by m50d · · Score: 4, Insightful

    This is what happens when you tie together parts of the OS that shouldn't be put together. In particular, has apple not realised that having the browser tied to anything that expects local rather than remote content is fundamentally an incredibly stupid idea?

    --
    I am trolling
  5. In soviet russia by zkn · · Score: 4, Funny

    Apple copies Microsoft.....

  6. Yeah... by Nanoda · · Score: 3, Funny
    imagine porn sites auto-installing adware widgets without your knowledge.

    Yeah... I'm imagining those porn sites.........

  7. Not much of a problem... by InternationalCow · · Score: 5, Informative

    If you do not tick the "open safe files" check box in the prefs. Which you should left unchecked if you're not entirely stupid, as there is no way to tell whether any file is actually "safe". Good Internet Practice, as I like to call it.

    --
    ----- One learns to itch where one can scratch.
    1. Re:Not much of a problem... by Anonymous Coward · · Score: 5, Insightful

      No, it should be pretty easy to tell what is a "safe" file. PDF, for example, is a safe file, as is HTML, as is a GIF. A dashboard widget is NOT.

      Apple really screwed up with allowing dashboard widgets to be listed as a "safe" file and they need to patch this as soon as possible. This is one of the big problems with IE, that they went from "autoopen anything, even unsafe stuff" to "warn you about viruses when you try to download ANYTHING, including a PDF". Clearly identifying what is safe is as important as identifying what is unsafe, otherwise people just double-click everything they download not realizing it's a .app.

    2. Re:Not much of a problem... by Mike+McTernan · · Score: 5, Insightful

      Which you should left unchecked if you're not entirely stupid

      I always thought that one of Apple's selling points was that they are made for non-experts. So giving users an option to potentially shoot their foot off seems to be a little unfortunate. Almost by definition, few people are experts.

      --
      -- Mike
    3. Re:Not much of a problem... by Lars+T. · · Score: 3, Informative
      --

      Lars T.

      To the guy who modded me down from perfect to terrible Karma - Apple haters still suck

  8. The solution by Little+Grey · · Score: 5, Informative

    Is to turn off "Open 'Safe' downloads" in Safari's Options.

    It's just common sense anyways

    1. Re:The solution by ender81b · · Score: 5, Insightful

      The solution to spyware on windows is to turn off activex in internet explorer and set it to run as guest...

      It's just common sense.

      Seriously though this is a very bad idea and apple needs to fix this ASAP.

  9. Re:Firefox asks what to do by Bungopolis · · Score: 5, Informative

    This warning applies specifically to Safari. It's obviously not going to affect Firefox, because Firefox does not have the widget auto-installation feature that Safari does. Most users of Tiger, however, are probably using Safari, so this most certainly is dangerous.

  10. Re:Thanks Slashdot! by jericho4.0 · · Score: 4, Funny
    Oh. My. God. There's a zip file on your desktop. Holy Shit. A zip file, for Christ's sake! What will your fate be? Long and painful, or medium and painful? How will your family go on?

    --
    "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  11. Awww...How cute! by justforaday · · Score: 3, Funny

    Looks like he was nice and made us a goatse.cx widget. Too bad I don't have Tiger yet... :'(

    --
    I'll turn into a supernova and burn up everything. Well I'll turn into a black little hole and you'll turn into string.
  12. Several levels of control by pelorus · · Score: 4, Insightful

    First, when a widget starts to download, Tiger prompts me and says "This download contains an application, do you want to continue?" That should be the first dead-giveaweay.

    Secondly, while the OS DOES copy downloaded widgets to the Widgets folder in the Users directory, the widgets do not become active until you actually activate them. (of course there's nothing stopping you from usign the same name and icon as ...say Calculator).

    Getting widgets to do complex system-level stuff you WANT them to do is tough enough.

  13. Re:Thanks Slashdot! by YrWrstNtmr · · Score: 3, Informative
    FF can be set to d/l automatically. "Do this automatically for files like this from now on." If you've clicked that box in the past, zip files will be automagically downloaded. This will work for any filetype. Automatically play a .wav/mp3 file, or open a .doc, or d/l whatever.

    Dumb to do, but it can be set like that.

  14. Re:Ouch! by justMichael · · Score: 3, Informative
    That seems liek quite a security flaw... Any timeline on it being patched?
    Preferences -> General -> Open "safe" files after downloading (uncheck)

    Problem solved. Having that pref checked is asking for trouble. You can drop whatever you want in my downloads, I'll open it myself when I'm ready.

    Disclaimer: I am not running Tiger, so this may not be 100% correct.
  15. O Great Oracle of Slashdot by Dachannien · · Score: 5, Funny

    If there's anything that Slashdot has taught us, it's that it's never safe to use your computer.

  16. The really funny part is by mcc · · Score: 3, Insightful

    Safari is uber paranoid about other filetypes now-- if you download a tar or a dmg it says "warning, this file may contain an application, are you sure you want to uncompress this?" It didn't do this before Tiger.

    The unzip/install widgets thing wasn't a conscious decision. This is clearly a bug.

  17. Imagine it? by Anonymous Coward · · Score: 4, Funny



    imagine porn sites auto-installing adware widgets without your knowledge

    Imagine it? I'm a Windows/IE user...I live it!

  18. Dashboard: Slightly OT but worth a look by uprock_x · · Score: 3, Interesting

    Click OnLine, BBC's tech show:

    http://stream.servstream.com/ViewWeb/BBCWorld/File /worl_click_030505_show_hi.rm?Media=60506

    Cole asks Apple manager: is Dashboard a big rip off of Konfabulator?

    Apple manager's response:um, er...Desk..Accessory...um...things......from before....like

  19. Thank God for Firefox and Windows by Pedrito · · Score: 3, Funny

    I'm just glad I'm running Firefox under Windows. No need for me to worry about nefarious web sites.

  20. Re:Ouch! by mrchaotica · · Score: 4, Insightful

    Yeah, but "unchecked" should be the default.

    --

    "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

  21. This can't possibly be true by rudy_wayne · · Score: 3, Funny

    This can't possibly be true.

    Everyone knows that Linux and OS X are perfect and only Windows has security exploits.

    Let's get it right people! You're slipping!

  22. some guy in Russia by Eric_Cartman_South_P · · Score: 3, Funny
    "some guy in Russia"

    Just find this guy and kick his ass. Problem fixed, no need to patch shit.

  23. Didn't work on my system by 1nhuman · · Score: 5, Interesting

    I do use Tiger and Safari, but it didn't work on my system. Primarily because in Safari > System Preferences > General, I Unchecked the check box that automatically open's up Safe files, which includes archives (which I do not consider safe).

    Another thing I did, was to redirect downloads to a special download folder which has a special Folder Action attached that scans new files for viruses and then changes new files permissions to "No Access" (even if there are no viruses). If I want to open/read a downloaded file I have to change it permissions to read/write, for which I made a single-click Apple script that I dragged in the Finders top bar thingie. Ok I'm slightly paranoid, mainly because IT security is my thing (btw the reason why I switched to Mac OS X last year), But it works.

    --
    The glass is half-full. With poison. And there are cracks in the glass. The dirty, dirty glass.
  24. Important correction by daveschroeder · · Score: 5, Informative

    Well, it turns out I spoke too soon.

    I said that Dashboard would prompt you when the widget was run for the first time. It turns out that for auto-installed Safari widgets, it does NOT prompt you the first time the widget is run.

    Interesting.

    This is indeed a security issue, and it should be made to at least prompt the user.

    Considering that ALL other new widgets always prompt when first run, this appears to be a bug, and not the intended behavior.

    The temporary fix (and what I always recommend anyway) is to disable "Open 'safe' files after downloading" in Safari.

  25. Re:Ouch! by LO0G · · Score: 5, Insightful

    So does IE. ActiveX controls have ALWAYS prompted.

    And with XP SP2 (released in AUGUST) unsigned binaries simply can't be installed, and the default is "NO" for signed binaries...

    Somebody thought they had a cool feature and didn't think about the consequences.

  26. Re:Ouch! by soulhuntre · · Score: 5, Insightful

    Um, never? Because it actually prompts you and asks you if you're sure you want to run it?

    So the fact that IE does the same thing for, say, ActiveX and has similar options for control is consistently ignored on /. int he name of the great Jihad but a exactly similar (or worse) Apple problem gets apologists running.

    So amusing.

    --
    --> Fight tyranny and repression.... read /. at -1!
  27. Re:Sky not falling, Safari warns user twice. by mithras+the+prophet · · Score: 5, Informative
    Safari will warn you when downloading a widget with cocoa calls in it by saying "widgetname contains an application. Are you sure you want to continue downloading widgetname?". You have the option to abort download and installation.

    Yes, but you won't get that prompt for a widget that doesn't have Cocoa code, but does contain widget.System() calls -- which effectively means it's an application. You could put an executable in your widget, not set the executable bit, but then chmod a+x and run it from widget.System() calls.

    Dashboard will ask you the first time a third-party widget is run and give you the option of not running it.

    It's so bizarre I didn't believe myself at first, but this is not true of widgets that are auto-installed. Try it yourself -- here is my example exploit page with an entire set of widgets that look identical to the Apple widgets. You will be prompted for permission with none of them, including the `Calculator' widget, which makes a widget.System() call and could conceivably have deleted your home directory.

    --
    four nine eighteen twenty-7 thirty-nine forty-7 fiftyeight sixty-nine seventy-9 eighty-8 one-hundred-and-nine one-twenty
  28. Re:Ouch! by mithras+the+prophet · · Score: 4, Informative

    I think you already corrected yourself above, but for others reading this, no, it doesn't prompt the user before running an auto-installed widget, which is such a fantastically bad idea I can't believe it didn't occur to anyone what a security flaw that is.

    --
    four nine eighteen twenty-7 thirty-nine forty-7 fiftyeight sixty-nine seventy-9 eighty-8 one-hundred-and-nine one-twenty
  29. Re:Firefox asks what to do by hey! · · Score: 3, Insightful

    It certainly makes you wonder -- what was apple thinking? How many years have there been security issues with ActiveX? How could anybody with an IQ above tepid water possibly think an autoinstallation feature is a good idea in a web browser at this late date?

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  30. Re:Ouch! by JudgeFurious · · Score: 3, Insightful

    Is it "exactly" or is it "similar"?

    Or is it "worse"?

    I'm confused here but I'm not running. Of course I'm not an apologist either.

    Whether you're talking about IE or Safari the same thing holds true. Saying "yes" when you're prompted despite not knowing what you're installing means you're a fucking moron and you deserve whatever you get.

    --
    Appended to the end of comments you post. 120 chars.
  31. Oh but it has, and you've proved part of my point by EtherAlchemist · · Score: 5, Insightful


    Good thing it hasn't happened then.

    Sure it has. Still does, past and present examples.

    Joke or not, your comment is indicative of the denial most Mac users seem to live in- "If it's not Windows, it's secure" and "If I don't hear about it, I must be OK" but the fact is that Mac OS X uses BSD, BSD has holes == Mac OS X has holes. Mac OS X is written by people who want users to have the easiest possible experience using their Mac. As a result, some of the things in place to make usability easier open up holes. This is the same for any OS. Anytime you cater to the user first and security second (or later) you will always ALWAYS provide someone else a way in.

    I have no problem with using one OS or another, I use whatever the hell I need to get the job done- to me it's a tool, not a lifestyle. As such, I make sure my tools are safe and pay attention when someone says my OS has a hole or exploit or vulnerability, rather than just refusing to believe it's true.

    --
    R(k)
  32. Afraid that won't work cuz... by NoData · · Score: 4, Funny

    IN SOVIET RUSSIA...some guy kicks ass of YOU!

    (Oh christ, why? The karma, it burns like my shame)

  33. Dashboard tips by Absentminded-Artist · · Score: 4, Informative

    Fascinating article. I installed zaptastic_evil and was amused by it. Very annoying indeed. Widgets simply should not do this.

    Just a few points of interest.

    1) The widget may automatically download and get copied into the widgets folder, but it is not automatically installed onto the active dashboard. Therefor the user would have to manually click on it. Without knowing the widget is there, the user may not ever notice it. Of course, this is still a security risk, but this isn't the best way to propogate malware.

    2) Widgets can be deleted manually as pointed out in the article by going into ~/Library/Widgets and removing the unwanted widget

    3) The Dashboard can be reinitialized by killing the Dock. Those not familiar with terminal can just fire up Activity Monitor and kill the Dock there. The Dock immediately relaunches, then Dashboard reinitializes when it is launched again and the offending widgets are gone.

    4) Apple should allow us to delete widgets from the dashboard, but the behavior when clicking and dragging a widget off of the Dashboard installs the widget instead of bringing up the delete puff of smoke. This behavior is at odds with every other taskbar/dock/menubar in OS X. I would recommend Apple change this.

    5) We ARE dealing with Dashboard 1.0 so there are bound to be bugs needing to be squashed. Personally, I enjoy Dashboard but find it difficult to manage when there are too many widgets deployed. I find myself wishing for Exposé for Dashboard! LOL I also wish that widgets would reinitialize without force quiting the dock and that the dashboard would be a bit more dynamic. Sometimes deleted widgets take a while to disappear off the dashboard as well as newly installed widgets. I look forward to the upcoming 10.4.1 release.

    --
    The Splintered Mind - Overcoming
    1. Re:Dashboard tips by Kyusaku+Natsume · · Score: 4, Insightful

      Certainly the cleanup and prevention is easy, but the fact that Safari downloads automatically widgets without user intervention/request is incredibly stupid, even more than the autoinstall -this is already stupid-, the guys who put those "features" on an fairly secure, wonderful and useful system sould be fired; this is seer incompetence, and a disservice for the rest of the fine, great OS X team. What the hell where they thinking? This sould have been scrapped in the design phase of Dashboard.

      I read this 5 hours ago and still I'm amazed. I say this has a -otherwise- happy mac user, and someone that made 6 friends switch to the mac.

      --
      Mexico: 100% conservative's America now!
  34. Re:Oh but it has, and you've proved part of my poi by BasilBrush · · Score: 3, Informative

    The grandparent was right. There haven't been any exploits. Both you and the link you give confuses the concepts of exploit and vulnerability. Exploit != vulnerability. A vulnerability is only the potential or an exploit, and it often blocked by other security measures in a properly layered security system.

  35. Re:Firefox asks what to do by Lussarn · · Score: 4, Insightful

    It still fills up your harddrive with possibly malicious crap. If thats ok for you Apple didn't do anything wrong even this time.

  36. Re:Oh but it has, and you've proved part of my poi by U96 · · Score: 3, Funny


    I use a Mac

    We could tell from your beret.

    --

    "I thought they were the dominant species..."
  37. Here's my plan -- I'll do what Apple hasn't done by TomorrowPlusX · · Score: 3, Insightful

    When I installed Tiger I thought to myself "why hasn't apple provided a mechanism for Widget management?"

    Secondly, I thought to myself "it would be so easy for a widget to do nasty things"

    So, here's what I'm going to do: I'm going to write a preference pane to manage widgets. It'll come in a few phases:

    Phase 1) Preference pane which will allow you to turn on/off particular widgets in your ~/Library/Widgets folder by moving turned-off widgets to, say, ~/Library/Widgets (Disabled). I just did a test and discovered that the parent process of Widgets is the Dock, which means that the Dashboard is just a Dock mechanism. So, killing the dock ( politely, even ) will give Dashboard a chance to reload, since the Dock restarts automatically.

    Phase 2) Write a widget scanner -- something which greps the widget source for keywords like widget.System() and whatever parameters are required for custom binaries which widgets can run. Now, I recognize I can't tell *what* those calls do, but I can at least put up a big red exclamation point next to the widget in the preference pane saying "This widget is potentially dangerous"

    Phase 3) Write a small bundled app to be packaged with the preference pane which associates itself with the .wdgt extension, and (somehow) gets higher association relevance than the Dock for execution. Then, when a widget is double-clicked on it gets copied directly into ~/Library/Widgets ( Disabled ) -- giving you the chance to enable it or not before the Dashboard gets it.

    This sounds like a PITA, but Apple shoulda done this in the first place.

    Apple: You're drunk on the perceived security of your platform. Don't keep making the stupid mistakes.

    A -- potentially better -- option is to have something like an "approved" widget download area. Say, apple's servers, where you know widgets hosted there have been given the thumbs up. Doesn't Firefox do something sort of like this for extensions?

    --

    lorem ipsum, dolor sit amet
  38. So turn it off by __aafutm5472 · · Score: 3, Informative

    I meant they should fix it in not allowing an untrusted remote application to be downloaded on a local computer with no interaction from the user.

    So turn off the ability. In Safari, open Preferences, and on the first tab, de-select 'automatically run "safe" files upon download.' Then, it'll download it, and you can manually install the widget by copying it to /Library/Widgets. No need to restart OS X or Dashboard, it just shows up.

    This was one of the first things I tweaked after switching to a Mac. I noticed it'd automatically mount disk image files, and I could see the potential security implication, so I found the checkbox and tunred it off.

    It's not rocket science, just basic research.