Britain is preparing for an offensive electronic attack on enemies like terrorists and rogue states which are targeting the country's critical national infrastructure through cyber attacks.

The government has admitted such a development and the UK Government Communications Headquarters (GCHQ) and the Ministry of Defence is already working on a plan to attack hostile nations and enemies, according to the Telegraph.

Currently two separate units of the Defence Cyber Operations Group are involved in developing a computer programme that could disable the conventional or nuclear capabilities of hostile nations.

"While the internet is undoubtedly a force for social and political good, as well as crucial to the growth of our economy, we need to protect against the threats to our security," the Telegraph quoted David Cameron as saying.

The new "cyber security strategy" of the government says that a "joint cyber unit" based at a military facility near the Cotswold town of Corsham "will develop and use a range of new techniques, including proactive measures to disrupt threats to our information security."

Another unit, based at the Cheltenham headquarters of GCHQ, will "develop tactics, techniques and plans to deliver military effects through operations in cyberspace."

The government does not name China and Russia, the sources of an undeclared cyber war, but the document says: "Some of the most sophisticated threats to the UK in cyberspace come from other states which seek to conduct espionage with the aim of spying on or compromising our government, military, industrial and economic assets as well as monitoring opponents of their regime," the newspaper report says.

The cyber security strategy bans the criminals and cyber bullies from using the internet for the criminal offenses they commit online.