Will we ever see something like the Sasser worm for the Macintosh or Linux? Its an interesting question, and not just for academic reasons. Undoubtedly, many people who choose these platforms do so because they think it immunizes them from the sorts of attacks Windows users must deal with.
This past week saw the announcement of several vulnerabilities in Mac OS X, some extremely serious. The first, a heap overflow in QuickTime reported by eEye, could allow an attacker to run arbitrary code in the context of the user running the QuickTime player.
The eEye advisory takes Apple Computer Inc. to task for understating the importance of the bug—for which Apple has supplied a patch—and for the obviousness of the vulnerability. Indeed, based on developer documentation cited by eEye, it sure quacks like a heap overflow.
A far scarier vulnerability was reported by @stake Inc. Its a remotely exploitable stack-based buffer overflow that could allow a user to execute arbitrary code as the root user.
This could be the big one. Based on this, you really could build a Sasser-type worm, one that travels from computer to computer without the user having to do anything stupid such as launch an attachment. The whole thing could happen at night while youre asleep.
The overflow is in the Apple Filing Protocol (AFP), which provides file-sharing services for both clients and servers similar to SMB/CIFS on Windows and Samba. Its true that AFP is not enabled by default, but its enabled on anything sharing files.
Certain requests to authenticate with the target system can overflow it simply by specifying a pathname longer than the specified length. This one, again, shouldnt have made it past any serious scrutiny. It works on multiple OS X versions, and it can give the attacker root privileges. Apple has patched this, too. See the Apple Security Updates page for more details and for the patches.
Interestingly, Apple released several other patches this week. None of them appears to be as serious as the two above, but its hard to be comfortable with that since Apple appears to understate the importance of the AFP problem.
For example, the companys advisory says that the point of the patch is “to improve the handling of long passwords.” Because of this, security firm Secunia has chosen to assume that all of the vulnerabilities are more serious than Apple concedes.
Next Page: A Mac worm would not spread as quickly.
Fewer Mac Targets
But as a practical matter, could the AFP overflow really become a successful worm? I could see it happening. The key is that, unlike a mail worm, the theoretical AFP worm could do some network reconnaissance. Even if it didnt, an attack wont be quite as noticed as with a mail-based attack.
Lets assume that 5 percent of systems out there are Macintoshes. That means that, scanning randomly, only one in 20 systems attacked could be susceptible. And some percentage of those will either be OS 9 or a patched OS X.
But it could still spread, just not as quickly as a Windows worm because there are so many fewer targets to hit. And of course, a properly configured firewall also could block the AFP attack.
The lack of targets is probably the reason why nobody writes mail worms for these platforms. Youd need to seed the worm carefully not only with Mac users—or Linux users, or whomever youre attacking—but with people who had an affected version and who hadnt patched. I can still see it working, but as long as 90-something percent of users are running Windows, it will be harder for a non-Windows attack to gain critical mass.
Theres a sort of moral hazard in recommending that people use a particular platform because its not popular. If too many people take the advice, it becomes self-defeating. Theres a good theoretical argument that worms could be successful on Linux or the Mac, and perhaps they will be more common in the future. But for the present, its hard to argue with history.
Security Center Editor Larry Seltzer has worked in and written about the computer industry since 1983.
More from Larry Seltzer