Contrary to what you may have heard, the Mac OSX operating system isn't immune to viruses.
If I only had a penny for every time I read or heard the old rumor, "Mac's don't get viruses" or "You don't need antivirus protection because you have a Mac." Really? I can't believe there are people out there that believe this non-sense. There's no software on the planet that's 100% secure, better believe that. So Mac OSX is vulnerable. Now maybe to a lesser degree than Windows, but I'll explain why next.
The main reason you don't see many malware attacks geared toward the Mac OSX operating system, is simply because most of the world runs on Microsofts Windows operating systems. So, if you are spending the time and resources to write malicious code, you're going to go after who ever is the most prevalent. This ups your chances of your attack being successful. Don't believe me? Check out the chart below. It show's, how much of the market share, each operating system occupies.
Microsoft's Windows operating system's occupy a whopping 80.66% of the desktop market place. This means, Apple's Macintosh OSX only occupies 7.66% and Linux based operating systems, like Ubuntu, are onlyoccupying around 1.68%. Now in enterprise environments, it's a bit different as well.
Unix, or a Unix, variant is ran on 98.3% of servers, with Windows running on about 1.7% of them. There are versions of the Mac OS for servers, but it is rarely ,if ever, used in the real world. Super computers are also running either Linux or Windows. Hmmm.......check out the chart below.
So, the main reason Mac's don't get attacked more often is simply a number's game. Mac's OSX code is based off of XNU, not UNIX. XNU is basically a blend of Mach, BSD and Apple specific components. Windows was based off of MS-DOS up until version 3.11, which is when they switched to NT. Linux is based off of Unix code and it is very secure. Differences in their filing structures and the way the operating system operates also effects how code will be executed. Also Mac's OSX permission system is set up to try and prevent files from running freely. Windows is set up for programs to have much more freedom. These differences might make the Mac OSX operating system seem a bit more secure than the Windows operating system, but in reality it isn't.
There are also many, many more Windows based applications and downloads. This provides people much more opportunities to infect machines with their malware. So, I hope you now see that Mac's aren't as immune to viruses, malware, or spyware, as you might think. It's just a matter of time. As more people use Mac OSX, then more and more malicious code will be written specifically for them. So what do you think?