Shortly after reports of the first virus for Mac OS X, a new security flaw has surfaced. The culprit is the option "Open 'safe' files after downloading" in Apple's Safari web browser. This feature is activated by default. Its function is to automatically display images and movies after they are transmitted to the user's computer, using the application assigned to that particular document format. Safari will also unpack ZIP archives and display the documents within if they are considered "safe".

If active content such as an application or shell script is found within the archive, a prompt requests user confirmation. So far, so good. Problems ensue if a shell script is stored into a ZIP archive without the so-called shebang line. If this line is omitted, Safari no longer recognizes the content as potentially dangerous and executes shell commands without a confirmation prompt. This behavior has been discovered by Michael Lehn, who has documented it on a web site.

News source: Heise Online






There are 26 additional comments
Advertisement
(3 replies) Quote this comment Reply to this comment #1 Posted by Shadrack on 20 Feb 2006 - 22:24
"...so-called shebang line..."

is that the:

#!/bin/sh

line?

I noticed this when I first started using my Apple. I've been able to disable the auto open "feature," I need to also disable the auto-download "feature." I don't like how a website can send a file to my disk w/o me being prompted about it.
Quote this comment #1.1 Posted by DomFel on 20 Feb 2006 - 22:43
And they say Win$ is unsafe... :p
Quote this comment #1.2 Posted by virtorio on 20 Feb 2006 - 23:22
And they say Win$ is unsafe... :p

Tell me about it. Another 5000 issues like this a OS X will be on the same plane as Windows.
Quote this comment #1.3 Posted by IAIHMB on 21 Feb 2006 - 15:20
Not to mention the Windows market share is nearly 30 times greater then that of Macintosh's.
Quote this comment Reply to this comment #2 Posted by marlow714 on 20 Feb 2006 - 23:48
yikes..that's bad.
(4 replies) Quote this comment Reply to this comment #3 Posted by gabalicious on 21 Feb 2006 - 00:58
this is good for windows users...i think people are starting to look into vulnerablities on the mac more than ever now.
Quote this comment #3.1 Posted by shrike on 21 Feb 2006 - 05:14
It's not good for Windows users. It's good for Microsoft.

I personally don't care about OS X flaws like that. I don't like Windows too much, and I'm considering a Mac. Like I consider everything on the market. How does a flaw make it good for me? Knowing that software is buggy?
Quote this comment #3.2 Posted by lwebster_2000 on 21 Feb 2006 - 22:59
I think he meant to say something along the lines of that proverb that talks about tasting.... bad medicine...own, something like that

anyway, maybe this will help bring the mac boys and the windows boys together. without anything to argue over, we'll need a new common enemy - how bout those linux boys?....
Quote this comment #3.3 Posted by Jugalator on 22 Feb 2006 - 12:12
How about respecting everyone's OS choice? But that would be too much to ask for...
Quote this comment #3.4 Posted by Rekoil on 22 Feb 2006 - 19:58
we'll need a new common enemy - how bout those linux boys?....

Too bad us Linux boys are too mature to fight over something like that, sure there might be some script kiddies out there who will do that but not the average Linux user. Just my 2 cents
Quote this comment Reply to this comment #4 Posted by Mnemonicman on 21 Feb 2006 - 01:00
Vulnerabilities on a Mac? *Gasp*
Quote this comment Reply to this comment #5 Posted by DarkPhantasmo on 21 Feb 2006 - 01:31
doh

Last edited by DarkPhantasmo on 21 Feb 2006 - 02:27
(1 reply) Quote this comment Reply to this comment #6 Posted by zeta_immersion on 21 Feb 2006 - 02:53
as a mac/win/*nix user windows is still at the bottom ... look at the virus definition and u'll see why ... just because apple comes out with 32 fixes every 6 months where as windows comes with 10 each month (except the critical updates that can literally screw u're comp oh and by the way win updats do **** up u're computer ... sp2 and others ... none the less osx might catch up but as for editing music, videos and others, macs do kick ass
Quote this comment #6.1 Posted by dwarhya on 24 Feb 2006 - 19:37
Seriously, who cares what OS is top or bottom. As long as your own flavour of OS is safe for you to use, then whats the big deal.

Why is it when someone starts a thread about windows/Mac/Linux, they always end up in a 'my dick is bigger than your dick' competition
(2 replies) Quote this comment Reply to this comment #7 Posted by thenewbf on 21 Feb 2006 - 06:11
Solution: don't unzip untrusted shell scripts, and make sure the file you're unzipping is from a trusted source.
Quote this comment #7.1 Posted by PCyr on 21 Feb 2006 - 06:53
Hasn't this philosiphy been true for almost every type of virus/worm/trojan/etc.?
Quote this comment #7.2 Posted by Yazoo on 21 Feb 2006 - 10:06
doh!

best read the article again
(2 replies) Quote this comment Reply to this comment #8 Posted by n3urotic on 21 Feb 2006 - 08:38
Excuse me here,

Why does this shellscript matter if it is missing the #!/bin/bash line? Every one knows if you don't include that line a shellscript doesn't run anyways.

If Safari treats it as a text file, TextEdit would open showing the script's code.

Does the OSX built-in unzipper strip execute permission from files it extract?
Quote this comment #8.1 Posted by Jstphish on 21 Feb 2006 - 21:52
The example page I went to hid it in a .mov file that was zipped. I clicked on the link and once the download was finished it automatically opened up and ran a script in terminal that said, "Hello World" in German.
Quote this comment #8.2 Posted by necrosis on 22 Feb 2006 - 08:13
Ive ran stuff without the #!/bin/bash line. It just defaluts to the shell your currently in / your default shell. Im told all it does is tells the OS what shell to run the script in.
Quote this comment Reply to this comment #9 Posted by Jon on 21 Feb 2006 - 09:44
Aaah it's ok, I don't really want credit for my BPN post anyway

"Solution: don't unzip untrusted shell scripts, and make sure the file you're unzipping is from a trusted source. " < RTFA.
(1 reply) Quote this comment Reply to this comment #10 Posted by madnuke on 21 Feb 2006 - 16:30
Ah finally hackers have seen sense and 'think different' instead of attacking windows they are after Apple!
Quote this comment #10.1 Posted by Jugalator on 22 Feb 2006 - 12:15
"instead of attacking windows they are after Apple"

No, but a security company found an exploitable hole.
(1 reply) Quote this comment Reply to this comment #11 Posted by MegaManXcalibur on 22 Feb 2006 - 07:44
A quick way to disable this is go to the preference menu in Safari and disable the option to "automatically open safe file types." With that option unchecked this exploit is no longer an issue.
Quote this comment #11.1 Posted by Jon on 22 Feb 2006 - 15:16
That isn't correct. This also affects mail.app, and isn't due specifically to a Safari bug.
Quote this comment Reply to this comment #12 Posted by simeandrews on 22 Feb 2006 - 15:18
I think the problem is that Apple thought they could include anything in their system but no one would care. but once someone made one trojan for Os X, everyone is looking for holes. Meaning Apple has to be more careful.
[1]

Commenting has either been disabled on this article or you are not logged in. Click here to login or register, its free!

Note: Anonymous commenting is disabled in order to keep the quality of responses to a high standard.


Scroll to the Top
....
My Preferences
....
Communicating with server
Loading
Please Wait...
....
Loading
 X 
....