China is often the target of complaints from around the world about computer hacking. But on Thursday, the government's foreign press office may have been the victim.

When foreign journalists in Beijing glanced at a text sent by International Press Center (IPC), the Chinese foreign ministry’s press outfit, Thursday afternoon, to their surprise, it was not the usual notice of an upcoming press conference or event.  It was a warning about a computer virus.

“Please be informed IPC has not sent any notices via email recently. If you received an email titled CPC Sets 18th National Congress on Nov 8, please ignore and delete it. It could contain malwares and be sent through email robot.”  It said legitimate IPC e-mails would contain the press center’s signature.

It turns out the IPC discovered that their e-mail on Wednesday was hijacked by a Trojan virus, or malware, and by Thursday afternoon the problem was still not fixed, said an employee there. They received 200 to 300 notices in one afternoon about fake e-mails that appeared to come from the IPC, sent to foreign journalists’ e-mails saved in the IPC address book.  About a half-dozen foreign reporters in Beijing reported receiving the spam e-mail.

For years, the Chinese government has been criticized around the world for hacking into foreign computers. Rear Adm. Samuel Cox, the U.S. Cyber Command’s director of intelligence, in September accused China of persistent efforts to pierce the Pentagon’s computer networks. In the final U.S. presidential debate, Republican nominee Mitt Romney also blamed China for “hacking into our computers.”

Earlier this month, a report made by the U.S. House Select Committee on Intelligence, said Huawei and ZTE, two Chinese telecommunications equipment manufacturers, should be considered a threat to U.S. national security and the two companies should be excluded from the telecommunications suppliers list. Both the Chinese government and the enterprises denied the charges.

The IPC’s troubles might allow the Chinese government to show to foreign journalists that China is really a victim of cyber attacks. Coincidentally or not, the cyber attack comes just two weeks before the opening of the 18th Party Congress, when China is set for a once-in-a-decade leadership transition.