In both cases, computers were infected through software downloaded from a site for software developers. The attacks took advantage of flaws in the Java plug-in for Web browsers.
Neither company said that there was any evidence that the attackers gleaned any data from their attacks.
The Java vulnerability is well known, and Apple has taken measures to disable the plug-in on all Macs. It says it would release an update malware removal tool to remove infections.
In January, the U.S. Department of Homeland Security recommended disabling Java in Web browsers to avoid hacking attacks.
By Rand Paul
Obama acts as though we no longer have a Constitution
Independent voices from the TWT Communities
Born in 1930 in rural Missouri, Charles Vandegriffe, Sr., brings his time and place to the Communities.
History doesn't have to be grim; there is a lot to be learned from the pages of time.
Contributions to the Communities Sports desk from readers.
Benghazi: The anatomy of a scandal
Vietnam Memorial adds four names
Cinco de Mayo on the Mall
NRA kicks off annual convention
California wildfires wreak havoc