Beijing kept the number one spot for malware, followed by Wattleup, Australia, at 3.7 percent, and Madrid, Spain, at 2.5 percent, according to Network Box.

The percentage is calculated from event logs transmitted by about 700 customers using Network Box's security appliance, which has a firewall along with antispam, antivirus, antiphishing and content filtering technologies. The company catches about 4 million samples of malicious software a day.

As more and more users come online in China, there's a good chance those computers are using pirated software without up-to-date security fixes, making them prime targets for hackers who are actually located elsewhere in the world, Heron said.

Those compromised computers, which are used to send spam and make it more difficult to identify the spammer, are so valuable that hacker gangs have been competing to take over machines, Heron said.

If one gang finds a machine running another gang's Trojan horse program -- one that appears harmless to the victim but can be used to control a machine -- they'll try to remove the software.

"If you finally have your Trojan onto a system, you don’t really want it running somebody else's software because there's a better chance the user will realize it and do something about it," Heron said. "I guess there’s no honor amongst thieves."