Mac has always been a very secure and virus-free operating system. But in the past, attackers and hackers have tried to infect Mac and stole user's personal and confidential information. Recently, Mac got hit by an attack, a variant of 'LuckyCat' virus, that took advantage of Microsoft Office Word to hack into the user's system and steals away with the important information and data stored on the hard drive. This was not the first time Mac was targeted by a backdoor virus. They had been targeted by many viruses and malwares in past too and some of them are listed below.
List of virus and malwares that attacked Mac OS X:
In Mac, file extensions are not visible on thumbnails so it will be easy for a virus to masquerade easily by depicting as some other file type. The patient-zero virus turned up in 2004 using this technique.
This virus becomes active in 2007 and it is used basically to get user login information of different sites like paypal and ebay.com. This virus pretends to be a quicktime codec and when user clicks to install it, a DNS server gets installed which takes them to a fake site of ebay and paypal.
It was a phishing attack that came into action in 2008 which tells Mac users that their Mac is corrupted and you need to install 'MacGuard' to protect Mac. But in reality this was a attack to steal users credit card details.
Flashback virus affects Mac in september, 2011. This virus pretends to be an installer of the Adobe flash player and affected Mac when users installed it thinking as adobe flash player. When the user started this infected application, virus started executing the code and sent the user personal information to remote server. You can get more info about this on http://data-recovery-tool.blogspot.in/2012/07/how-flashback-virus-affected-mac.html.
But still Mac is far safer than Windows which gets easily vulnerable to viruses and malwares but it's not fully protected and safe. It is advisable to install a good antivirus on your Mac.