Apple Inc is fighting what security experts say may be the most pernicious types of computer virus to ever target its line of Mac computers.

The company has issued a security advisory warning to customers about a recent scam that infects Macs with malicious software that wrongly tells them their computer is infected with a virus. The ultimate goal is to get credit card numbers and other valuable personal information.

It is one of the first major campaigns that cyber crooks have launched against Mac users. To date, criminals have focused on writing malicious software for machines running Microsoft Corp's Windows operating system, which inhabits more than nine of every 10 personal computers.

But as Macs have grown in number, they have become more attractive targets.

The fake anti-virus malware is downloaded when people click on links from tainted search engine results for popular queries, according to anti-virus software maker McAfee Inc. It also spreads when users click on links to malicious sites that might be included in emails, Tweets or Facebook messages.

Apple said it will issue an update for its Mac operating system "in the coming days" that will automatically find and remove malicious fake anti-virus software. It will also warn Mac users when they download such programs.

In the meantime, Apple has issued advice on how users can clean up machines that have been infected by the malicious software, which goes by names including MacDefender, MacProtector and MacSecurity.