Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I ask in seriousness. Please do not post answers like, "because Windows sucks!"

Why do Macs pretty much never get viruses/worms/trojans, in comparison to Windows? Is one reason the rwx permission implementation, where that I must explicitly grant a program execute permission to run?

What would be another reason?

share|improve this question
1  
Macs pretty much never is inaccurate. There may be fewer OS X malware, but early Mac OS had hundreds if not thousands of viruses and worms. (Note: I did not downvote) –  mctylr Mar 16 '10 at 18:03
    
Alright then, I've put a "in relative comparison to Windows" constraint on my question. Now can I have my point back? –  Chad Johnson Mar 16 '10 at 18:08
2  
+1 I think it's a fair question. However, I would still rephrase to Why are Macs so much less likely to get viruses/worms/.... –  IAbstract Mar 16 '10 at 19:07
9  
"How about an explanation, coward?" Drive by downvotes are annoying, but abuse is out of line. –  dmckee Mar 16 '10 at 19:10
5  
The reason for the downvote was also the reason for the edit. You're threatening tone really doesn't make me want to answer. –  Josh K Mar 16 '10 at 19:35

7 Answers 7

up vote 13 down vote accepted

Less market share means less attackers looking for vulnerable machines.

A stronger operating system means less vulnerabilities.

The way the operating system is laid out malicious programs have to find other ways around security protocals. Windows is very safe if you run it as a normal user. Run as an administrator and you will have issues.

Using sudo to elevate permissions on a case by case basis denies many malicious programs the opportunity to run in the first place, let along gain permission to cause damage.

share|improve this answer
    
I deleted the comments, we don't need any bickering without constructive arguments. If there's a real problem: take it to Meta! –  Ivo Flipse Mar 18 '10 at 10:43

The biggest reason is the size of the target. Virus authors want to infect as many people as possible and Windows has the majority of the market. I honestly believe if Apple had that much market share they would have very similar problems to what Microsoft experiences today.

share|improve this answer
7  
This is absolutely the reason. Virus and malware exist for two reasons: destruction and profit. In either case, you want to do as much as possible and since MS has the market share, they are the target. If Mac or Unix had the market share MS does, they would have just as many viruses and malware for them. –  BBlake Mar 16 '10 at 18:12
    
Honestly I don't think it is. It's true that there would be more, but getting a user to download a malicious program and then run it after typing in their password would severely limit the number of programs that would. The makers of these programs would have to find a way to bypass the security protocols, which would in turn require some serious work on the core code of the operating system to find. –  Josh K Mar 16 '10 at 19:38
1  
@Josh K: Yes it's a lot of work, but if Macs occupied 90% of the market I'm pretty sure the virus counts would be reversed. –  guitarthrower Mar 17 '10 at 15:56
    
@quitarthrower: I'm not sure. I think that first of they won't ever occupy 90% of the market, and second that the average "hacker" would have to greatly step up their game. When was the last major problem virus? –  Josh K Mar 17 '10 at 19:11
    
@Josh: Many hackers today compare Windows' security quite favorably to what OS X does. Having a UNIX underpinning doesn't automatically mean that the OS is secure. Forcing the user to enter a password before installing anything malicious won't deter the average home user, though. Dancing bunnies and stuff :) –  Joey Mar 27 '10 at 11:36

I'm not sure I buy the 'more secure' arguments. They have annual contests to see which systems get broken into first, and Macs fair just as poorly as any other system. If a hacker wants in, they'll find a way.

Other posters have said this, but it's all about market share. Why target 10% of computer users, when you can target 90% and get most major corporations while you are at it.

share|improve this answer
    
+1 for the point about Macs falling victim quite early in hacker contests. –  ChrisF Mar 16 '10 at 21:47
    
If a hacker wants access to your data, he will steal your computer. So in my oppinion, virus protection is protection agains drive-by internet infections. –  bastibe Mar 17 '10 at 1:17
    
Apple haven't implemented Memory randomization for reasons best know to themselves - they did promise to in Snow Leopard. This is the reason hackers keep cleaning up in these competitions and winning Macbook Airs and the like. Apart from that they're fairly secure, but at the moment W7 does better in this respect. –  alimack Mar 17 '10 at 10:30

(1) better security model (2) smaller market share (-> less motivation for malware authors)

share|improve this answer

It will have to be that Mac are "harder" to infect, because if it was as easy, there are still a lot of Macs out there. It's simply the "path of least resistance" rule at work.

Blaming the "infectibility" of windows on it's market share is one of those turning the negative into a positive that must have been generated at a conference table in a large room in Redmond.

share|improve this answer
    
+1 for your first point. -1 for your last; though it's rather exotic to think of Microsoft as the Men In Black. –  SnOrfus Mar 16 '10 at 20:10

One reason is that the security model on OS X is quite strong: even administrative users have to enter their password before they're allowed to modify system files.

Windows XP didn't have anything like this: Admins could do everything they wanted by default, but non-admins couldn't do much at all, pretty much requiring everyone to run as Admins all the time and leave the door wide open. Lately they've been moving towards a more Mac-like model, but in Vista this resulted in "Do you want to allow this behavior?" boxes popping up so often that people got into the habit of ignoring it, or worse, turning it off entirely.

Mac users usually only have to confirm behavior when installing software, so if they're asked to enter a password at any other time it immediately arouses suspicion.

Another reason viruses and worms are so rare on OS X might be because much of the core of OS X is open source, in particular based on FreeBSD, an old, mature code base known for its security.

Most of the malware I've heard about for the Mac has been classic trojans: just trick the user into thinking they're downloading and installing something they want. No OS in the world could ever protect against that.

share|improve this answer
4  
You can't protect against a stupid user. –  Josh K Mar 16 '10 at 20:25
    
You can, just not a determinedly stupid user. You can protect against ignorance to a certain extent. –  alimack Mar 17 '10 at 10:32

Mac has more secure process communication, on windows it's easy to tell other proses to do something eg. send a message that a button was clicked, thats why you have the annoying User Account Control dialog for administrative tasks. On mac processes only respond to authorized messages.

PS. Not really know, just repeating that someone told me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.