Defending against the OS X help: vulnerability
There’s a nasty OS X vulnerability under discussion at the moment which lets a web page execute code on your machine by taking advantage of a flaw in the “help:” protocol. There’s a non-malicious demonstration of the exploit on this page, and Jay Allen is hosting a discussion on the exploit and ways to avoid it.
To save you from digging through the discussion, the quickest way to defend yourself is to install the More Internet preference pane (mount the DMG, then copy the More Internet.prefPane file to your /Library/PreferencePanes folder or run the “install prefpane” script). Then go to system preferences, launch the “More Internet” panel, select the “help” protocol and use the Change button to assign it to some non-harmful application such as Chess (simply deleting the protocols will not solve the problem). While you’re there it’s a good idea to add a new protocol called “disk” and assign it to a non-harmful application as well—this prevents malicious sites from being able to auto-mount networked disk images on your system, something which while not exploitable on its own can be used in conjunction with other exploits (like the help: one) to execute arbitrary code.
For those who are interested, it seems the exploit itself is as simple as this:
<a href="help:runscript=MacHelp.help/Contents/Resources/English.lproj/shrd/OpnApp.scpt string=usr:bin:top">click to run 'top'</a>
Is it just me, or this at least as ignorant as MS Outlook running arbitrary JS in emails not so long ago?
There is a theory that Windows security is perceived to be so bad largely because it dominates the space, and presents a useful target, both in terms of infection and replication, rather than being actually inferior.
This sort of thing really lends creedance to the idea.
<a href="exec:data:arbitrary assembly" > doesn't seem too far off from this.
Jeremy Dunck - 18th May 2004 21:48 - #
Jay Allen - 19th May 2004 04:06 - #
Jeremy - 19th May 2004 20:49 - #
It appears you didn't read my comment very closely.
Jeremy Dunck - 19th May 2004 22:15 - #
Chris Beach - 19th May 2004 23:01 - #
The more sinister version uses Safari's "automatically open safe file types" to mount a .dmg file that the page sends you, then runs a script off that - /Volumes/imgname/scriptname is pretty consistent.
Changing the help:// will pretty much solve both problems, although also turning off Safari's "open safe d/ls" helps tighten things up a bit too.
Matt Wilson - 19th May 2004 23:12 - #
la1itree - 21st May 2004 01:15 - #
jc - 21st May 2004 15:26 - #
This has know been fixed with
Security Update 2004-05-24 --Fixed: HelpViewer "runscript" vulnerability
and
Security Update 2004-06-07 --Fixed: DiskImages, LaunchServices, Safari & Terminal
Mac OS X will now present an approval alert when an application is to be run for the first time either by opening a document or clicking on a URL related to the application.
http://www.info.apple.com/kbnum/n61798Tim Rutter - 24th June 2004 09:36 - #
Kolin - 26th August 2006 22:25 - #