Apple on Tuesday said it suffered a cyber attack similar to the one recently carried out against Facebook, but that it repelled the invaders before its data was plundered.
The maker of iPhones, iPads, iPods, and Macintosh computers said it is working with law enforcement officials to hunt down the hackers, who appeared tied to a series of recent cyber attacks on US technology firms.
"The malware was employed in an attack against Apple and other companies, and was spread through a website for software developers," Apple said in an email response to an AFP inquiry.
The malicious software, or malware, took advantage of a vulnerability in a Java program used as a "plug-in" for Web-browsing programs.
A "small number" of computer systems at Apple were infected but they were isolated from the main network, according the Silicon Valley-based company.
"There is no evidence that any data left Apple," Apple said.
Apple released a Macintosh computer operating system update that disables Java software that hasn't been used for 35 days or longer, as well as a tool for finding and removing the malware.
Word of hackers hitting Apple came just days after leading social network Facebook said it was "targeted in a sophisticated attack" last month, but that it found no evidence any user data was compromised.
Facebook said Friday that the malware came from an infected website of a mobile developer.
"We remediated all infected machines, informed law enforcement, and began a significant investigation that continues to this day," it said.
It was unclear whether it was the same website blamed for the attack on Apple.
Using a previously unseen tactic, the attackers took advantage of a flaw in Java software made by Oracle, which was alerted to the situation and released a patch on February 1, according to Facebook.
The hackers appeared to be targeting developers and technology firms based on the website they chose to booby-trap with malicious code.
"Facebook was not alone in this attack," the Northern California-based company said.
"It is clear that others were attacked and infiltrated recently as well."
Early this month Twitter said it was hammered by a cyber attack similar to those that recently hit major Western news outlets, and that the passwords of about 250,000 users were stolen.
"This attack was not the work of amateurs, and we do not believe it was an isolated incident," Twitter information security director Bob Lord said in a blog post at the time.
Lord said there was an "uptick in large-scale security attacks aimed at US technology and media companies."
The New York Times and The Wall Street Journal recently said they had been attacked by suspected Chinese hackers.
The brazen cyberattacks on US media and technology firms have revived concerns over Chinese hackers, whom analysts say are likely linked to the secretive Beijing government.
China's army controls hundreds if not thousands of expert hackers, according to a report Tuesday by a US Internet security firm that traced a host of cyberattacks to an anonymous building in Shanghai.
Mandiant said its hundreds of investigations showed that groups hacking into US newspapers, government agencies, and companies "are based primarily in China and that the Chinese government is aware of them."
The report focused on one group, which it called "APT1," for "Advanced Persistent Threat."
"We believe that APT1 is able to wage such a long-running and extensive cyber espionage campaign in large part because it receives direct government support," Mandiant said.
It said the group was believed to be a branch of the People's Liberation Army and digital signatures from its attacks were traced back to the direct vicinity of a nondescript, 12-story building on the outskirts of Shanghai.
China's foreign ministry rejected "groundless accusations" of Chinese involvement in hacking, saying China was itself a major victim, with most overseas cyberattacks against it originating in the United States.
In his State of the Union address last week, US President Barack Obama said the potential ability of outsiders to sabotage critical US infrastructure was a major concern.
"We cannot look back years from now and wonder why we did nothing in the face of real threats to our security and our economy," he said.
Explore further: Social media sackings risk stifling journalistic expression