It seems that most of the tech world has realized that Mac OS X is not actually immune to viruses and malware as some previously claimed. The announcement from SecureMac and Intego about two newly identified malware examples should convince any remaining deniers (via F-Secure).
The vulnerability of Mac OS X to malware is, of course, not surprising to anyone with knowledge of computer security. The fundamental problem is that the most used OS security controls in OS X are standard Discretionary Access Control (DAC), which can do nothing to protect against exploitable software. Until the day we can produce completely correct software – which doesn’t appear to be any time soon – we are going to need stronger security mechanisms than DAC.
Looking at the second vulnerability linked above, called PokerStealer.A, demonstrates the problem. Essentially, PokerStealer.A prompts the user for a password when started to discover the password for the current user. The F-Secure analyst Mark G. states:
It checks the provided password to see if it matches the username of the machine. If not, it will ask again. It needs the user’s password to continue.
What happens behind the scenes is the following: it enables the SSH of the infected machine by running; it acquires the local IP address, subnet mask, private IP address of the router (domain), public IP address by querying via the Internet; it gets the version of OSX, recovers its hash and saves it to a file named "secret_file".
After all the necessary information has been gathered it then sends the information to a specific e-mail address with a subject of "Howdy" and the message details include username, password, and IP addresses.
With the e-mailed information, the attacker can perform routines from a remote location through SSH without the user knowing it and may even take control of the infected machine.
The key point here, besides the social engineering part, is that the PokerStealer.A attack succeeds because the application has all of the access of the user that ran the application. This is the problem with DAC: the access of an individual program is not distinguished from the access of the user. There is no reason that most applications need the kind of broad access that allows this Trojan to work. If nothing else, not allowing network access by default to every third-party application would stop this Trojan (which is what Dan does for his xguest SELinux policy in Fedora 9).
I’m not the only one that has noticed this: Dino Dai Zovi suggests in a ZDNet blog:
Sandbox policies for Safari, Mail.app, and third-party applications. Code execution vulnerabilities aren’t the only kind of vulnerabilities and good sandbox policies for security-exposed applications can help mitigate the exploitation of code execution and other vulnerabilities in these applications.
The sandbox policies he is referring to are the new security mechanisms in 10.5 based on the TrustedBSD project, a sister project to SELinux. Dino makes several other good suggestions aimed at making software harder to exploit, but I was particularly glad to see the continued recognition that per-process mandatory access control is important.