Sorry, but they apparently have amnesia or just a very short memory span. OS 9 with an extremely small user-base had quite a few viruses in the 90s. Yet even today, with over 50 million users, there hasn't been a single one for OS X. Other types of malware not being as prevalent on OS X compared to Windows is because of inherent design decisions, not purely market-share. The server market where the majority are Linux boxes, still sees most of the exploits being used on Windows Server machines. Even Android's less secure OS has more malware than iOS. There's a reason the government is offering $50k for iOS exploits and only $5k for Android exploits.
Originally Posted by Coma
Macs being inherently more secure than Windows is a myth.
Not by a long shot:"1)
Until Vista, the admin account in Windows did not implement DAC in a way to prevent malware by default. Also, Windows has a far greater number of privilege escalation vulnerabilities that allow bypassing DAC restrictions even if DAC is enabled in Windows.
Much of the ability to turn these vulnerabilities into exploits is due to the insecurity of the Windows registry. Also, more easily being able to link remote exploits to local privilege escalation exploits in Windows is due to the Windows registry.
Mac OS X does not use an exposed monolithic structure, such as the Windows registry, to store system settings. Also, exposed configuration files in OS X do not exert as much influence over associated processes as the registry does in Windows.
Mac OS X Snow Leopard has contained only 4 elevation of privilege vulnerabilities since it was released; obviously, none of these were used in malware. Lion has contained 2 so far but one of these vulnerabilities doesn't affect all account types because of being due to a permissions error rather than code vulnerability.
The following link shows the number of privilege escalation vulnerabilities in Windows 7 related to just win32k:
More information about privilege escalation in Windows 7:
-> guide to develop exploits to bypass UAC by manipulating registry entries for kernel mode driver vulnerabilities.
-> more complete documentation about Windows kernel exploitation.
-> more complete documentation about alternative methods to exploit the Windows kernel.
-> article about the TDL-4 botnet which uses a UAC bypass exploit when infecting Windows 7.2)
Windows has the potential to have full ASLR but most software does not fully implement the feature. Most software in Windows has some DLLs (dynamic link libraries = Windows equivalent to dyld) which are not randomized.
-> article overviewing the issues with ASLR and DEP implementation in Windows.
Also, methods have been found to bypass ASLR in Windows 7.
-> article describing bypassing ASLR in Windows 7.
Mac OS X has full ASLR implemented on par with Linux. This includes ASLR with position independent executables (PIE). DLLs in Windows have to be pre-mapped at fixed addresses to avoid conflicts so full PIE is not possible with ASLR in Windows.
Using Linux distros with similar runtime security mitigations as Lion for a model, client-side exploitation is incredibly difficult without some pre-established local access. Of course, this is self defeating if the goal of the exploitation is to achieve that local access in the first place.
See the paper linked below about bypassing the runtime security mitigations in Linux for more details.
The author only manages to do so while already having local access to the OS.3)
Mac OS X Lion has DEP on stack and heap for both 64-bit and 32-bit processes. Third party software that is 32-bit may lack this feature until recompiled in Xcode 4 within Lion. Not much software for OS X is still 32-bit.
But, not all software in Windows uses DEP; this includes 64-bit software. See first article linked in #2.4)
Mac OS X implements canaries using ProPolice, the same mitigation used in Linux. ProPolice is considered the most thorough implementation of canaries. It is known to be much more effective than the similar system used in Windows.
-> article comparing ProPolice to stack canary implementation in Windows.5)
Application sandboxing and mandatory access controls (MAC) in OS X are the same thing. More specifically, applications are sandboxed in OS X via MAC. Mac OS X uses the TrustedBSD MAC framework, which is a derivative of MAC from SE-Linux. This system is mandatory because it does not rely on inherited permissions. Both mandatorily exposed services (mDNSresponder, netbios...) and many client-side apps (Safari, Preview, TextEdit…) are sandboxed in Lion.
Windows does not have MAC. The system that provides sandboxing in Windows, called mandatory integrity controls (MIC), does not function like MAC because it is not actually mandatory. MIC functions based on inherited permissions so it is essentially an extension of DAC (see #1). If UAC is set with less restrictions or disabled in Windows, then MIC has less restrictions or is disabled.
-> article about Mac sandbox.
-> MS documentation about MIC.
-> researchers have found the MIC in IE is not a security boundary.6)
In relation to DAC and interprocess sandboxing in OS X in comparison with some functionality of MIC in Windows 7 (see #5), the XNU kernel used in OS X has always had more secure interprocess communication (IPC) since the initial release of OS X.
Mac OS X, via being based on Mach and BSD (UNIX foundation), facilitates IPC using mach messages secured using port rights that implement a measure of access controls on that communication. These access controls applied to IPC make it more difficult to migrate injected code from one process to another.
Adding difficulty to transporting injected code across processes reduces the likelihood of linking remote exploits to local exploits to achieve system level access.
As of OS X Lion, the XPC service has also been added to implement MAC (see #5) on IPC in OS X. http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html7)
Windows has far more public and/or unpatched vulnerabilities than OS X.
-> list of public 0days.
-> another list of public 0days. (Most if not all of the Apple vulnerabilities in this list were patched in the latest Apple security update -> http://support.apple.com/kb/HT5002
-> article about 18 year old UAC bypass vulnerability.8)
Password handling in OS X is much more secure than Windows.
The default account created in Windows does not require a password. The protected storage API in Windows incorporates the users password into the encryption key for items located in protected storage. If no password is set, then the encryption algorithm used is not as strong. Also, no access controls are applied to items within protected storage.
In Mac OS X, the system prompts the user to define a password at setup. This password is incorporated into the encryption keys for items stored in keychain. Access controls are implemented for items within keychain.
Also, Mac OS X Lion uses a salted SHA512 hash, which is still considered cryptographically secure. It is more robust than the MD4 NTLMv2 hash used to store passwords in Windows 7.
-> article about Windows password hashing.9)
The new runtime security mitigation improvements to be included in Windows 8 have already been defeated.
To put this into perspective, methods to bypass the new runtime security mitigations in Mac OS X Lion are not yet available.10)
In regards to recent earlier version of Mac OS X:
The following image relates to varying levels of security mitigations in different Linux distros but it is applicable in revealing that the runtime security mitigations in some earlier versions of Mac OS X prior to Lion were far from inadequate.
source -> http://www.blackhat.com/presentations/bh-europe-09/Fritsch/Blackhat-Europe-2009-Fritsch-Bypassing-aslr-slides.pdf
The following section of that image represents a comparison of Mac OS X Leopard/Snow Leopard to Windows Vista/7.
While Mac OS X Leopard/SL lack full ASLR, Windows Vista/7 have stack canaries (aka stack cookies) that are trivial to bypass.
The following link shows the issues with stack canaries in Windows. -> http://www.blackhat.com/presentations/bh-usa-04/bh-us-04-silberman/bh-us-04-silberman-paper.pdf
Windows Vista/7 = NX + ASLR
Mac OS X Leopard/SL = NX + stack cookies
The image shows that NX in combination with stack canaries is more difficult to bypass than a combination of NX and ASLR. "Edited by PoopaScoopa - 4/30/12 at 11:16am