A cyber warfare expert works on his Apple laptop computer during a portrait session in Charlotte, N.C., in this 2011 file photograph. Apple Inc. was recently attacked by hackers who infected the Macintosh computers of some employees, the company said on Feb. 19, 2013, in an unprecedented disclosure that described the widest known cyber attacks against Apple-made computers to date. Buy Photo

SAN FRANCISCO — Apple Inc. was recently attacked by hackers who infected the Macintosh computers of some employees, the company said on Tuesday in an unprecedented disclosure that described the widest known cyber attacks against Apple-made computers to date.

Unknown hackers infected the computers of some Apple workers when they visited a website for software developers that had been infected with malicious software. The malware had been designed to attack Mac computers, the company said in a statement provided to Reuters.

The same software, which infected Macs by exploiting a flaw in a version of Oracle Corp.’s Java software used as a plug-in on Web browsers, was used to launch attacks against Facebook, which the social network disclosed on Friday.

The malware was also employed in attacks against Mac computers used by “other companies,” Apple said, without elaborating on the scale of the assault.

Story continues below advertisement.

But a person briefed on the investigation into the attacks said that hundreds of companies, including defense contractors, had been infected with the same malicious software, or malware.

The attacks mark the highest-profile cyber attacks to date on businesses running Mac computers. Hackers have traditionally focused on attacking machines running the Windows operating system, though they have gradually turned their attention to Apple products over the past couple of years as the company gained market share over Microsoft Corp.

“This is the first really big attack on Macs,” said the source, who declined to be identified because the person was not authorized to discuss the matter publicly. “Apple has more on its hands than the attack on itself.”

National security

Cyber-security attacks have been on the rise. In last week’s State of the Union address, U.S. President Barack Obama issued an executive order seeking better protection of the country’s critical infrastructure from cyber attacks.

Over the weekend, cyber-security specialists Mandiant reported that a secretive Chinese military unit was believed to have orchestrated a series of attacks on U.S. companies, which Beijing has strongly denied.

White House spokesman Jay Carney told reporters on Tuesday that the Obama administration has repeatedly taken up its concerns about Chinese cyber-theft with Beijing, including the country’s military. There was no indication as to whether the group described by Mandiant was involved in the attacks described by Apple and Facebook.

An Apple spokesman declined to specify how many companies had been breached in the campaign targeting Macs, saying he could not elaborate further on the statement it provided.

“Apple has identified malware which infected a limited number of Mac systems through a vulnerability in the Java plug-in for browsers. The malware was employed in an attack against Apple and other companies, and was spread through a website for software developers,” the statement said.

“We identified a small number of systems within Apple that were infected and isolated them from our network. There is no evidence that any data left Apple,” it continued.

The statement said Apple was working closely with law enforcement to find the culprits, but the spokesman would not elaborate. The Federal Bureau of Investigation declined to comment.

Apple said it plans to release a piece of software on Tuesday, which it said customers can use to identify and repair Macs infected with the malware used in the attacks.