While creating a Mac OS X virus is not impossible, Janz said,
the degree of difficulty here is at least 9.5 on a scale of 1 to 10.
… because OS X always asks the user to type an administrator password before modifying anything in the system, attempts to install malware or alter system files immediately would be flagged.
Windows, the programmers said, has no such protections.
Any misbehaving task under Windows is capable of modifying any [non-running program] anywhere on the system, Janz said.
And, when that [executable] file is run, bad things will absolutely happen.
Many orders of magnitude more people look over the source code for OS X and the related BSDs than have access to Windows source code, said John Klos, a developer of NetBSD, a flavor of Unix closely related to OS X. Thus, many of the obvious holes in OS X were closed years ago.