Foreign Secretary William Hague appealed today for governments to come together to agree a set of rules amid growing fears of "cyber war" between states.
Addressing the Munich Security Conference, Mr Hague disclosed that as recently as last month the UK had come under attack from a "hostile state intelligence agency" seeking to penetrate the Foreign Office IT system.
He offered to host an international conference in Britain later this year to discuss "norms of acceptable behaviour" in cyberspace, backed by mechanisms that would give them "real political and diplomatic weight".
Mr Hague said that the increasing reliance on computer networks - controlling activities from the supply of electricity to the flow of money into high street cash machines - had created new vulnerabilities.
"It has opened up new channels for hostile governments to probe our defences and attempt to steal our confidential information or intellectual property. It has promoted fears of future 'cyber war'," he said.
He described how last month, three of his staff were sent an innocent-looking email, purportedly from "a UK colleague outside the Foreign Office", about a forthcoming visit to the region they were working on.
"In fact, it was from a hostile state intelligence agency and contained computer code embedded in the attached document that would have attacked their machine. Luckily, our various automated systems identified it and stopped it from ever reaching my staff," he said.
In another case last year, a "malicious file posing as a report on a nuclear Trident missile" was sent to a UK defence contractor by someone masquerading as the employee of another defence contractor.
Again it was detected and blocked, although its purpose "was undoubtedly to steal information relating to sensitive defence projects".
Mr Hague said Government systems were also being targeted by organised criminals - including the Zeus "malware" designed to steal bank details and other sensitive personal information.
In December, spoofed emails claiming to come from the White House were sent to large numbers of international recipients who were directed to a link which downloaded a variant of Zeus.
"The UK Government was targeted in this attack and a large number of emails bypassed some of our filters. Our experts were able to clear up the infection, but more sophisticated attacks such as these are becoming more common," Mr Hague said.
He suggested that a new international protocol should underline the need for governments to work together to combat the threat from criminals acting online.
It should also commit states to acting "proportionately" in cyberspace in accordance with national and international laws, while at the same time ensuring it remained open to "the free flow of ideas, information and expression".
"As liberal democracies, we also have a compelling interest in supporting democratic ideals in cyberspace, and working to convince others of this vision," he said.
" When we talk about defending ourselves against cyber threats, we also mean the threat against individual rights to freedom of expression that is posed by states blocking internet communications. The free flow of ideas and information is an essential underpinning of liberty."