British spies will significantly step up their efforts to attack terrorists in cyberspace in the face of Islamic State militants who want to use the internet to kill people, George Osborne has said.

Speaking at GCHQ in Cheltenham, the chancellor said the UK was prepared to use its digital powers to attack hackers, terrorist groups, criminal gangs and rogue states.

Osborne did not detail what cyber-attacks would be carried out by UK intelligence agents, but he said: “We reserve the right to respond to a cyber-attack in any way that we choose.”

The spectrum of capabilities could include infecting and disconnecting enemy computers or even disrupting power supplies to cause loss of life in the most extreme circumstances.

Osborne warned that whoever hits the UK should know “we are able to hit back”. He said Isis’s “murderous brutality has a strong digital element” in which the group seeks to kill through attacks on cyber infrastructure.

The chancellor would not reveal details of how Isis and other terror groups are trying to infiltrate UK cyber infrastructure, but there have been many reports of such attempts.

Junaid Hussain, a British Isis fighter who was killed in a drone strike in Syria, is believed to have been a key player in the so-called cyber caliphate waging war against the west online.

US Central Command Twitter account hacked to read 'I love you Isis' Read more

He hacked US Central Command’s Twitter and YouTube accounts in January and briefly used them to send pro-Isis messages, and was reportedly involved in hacking the email accounts of UK cabinet ministers.

In Britain, Hussain had been part of the hacker group Team Poison, where, using the handle Trick, he gained access to the address book of the former prime minister Tony Blair and published information from it. The hack earned him six months in jail in 2012. That same year, Team Poison tied up the phone lines of an MI6 anti-terror hotline.

Since his death in August, his group appears to have remerged under the name Islamic State Hackers. Osborne said: “At a time when so many others are using the internet to enhance freedom and give expression to liberal values and creativity, they are using it for evil.

“Let’s be clear. Isil are already using the internet for hideous propaganda purposes; for radicalisation, for operational planning too. They have not been able to use it to kill people yet by attacking our infrastructure through cyber-attacks. They do not yet have that capability. But we know they want it, and are doing their best to build it.

“So when we talk about tackling Isil, that means tackling their cyber threat as well as the threat of their guns, bombs and knives.”

The chancellor argued it was cheaper and easier to mount a cyber-attack than to defend against one. In a message to cybercriminals, he said: “We will defend ourselves. But we will also take the fight to you, too … To those who believe cyber-attacks can be done with impunity, I say that impunity no longer exists.”

He said the military would need to be involved because it must be able to fight the battles of the 21st century in cyberspace as well as on land, sea, in the air and in space.

In September 2013, Philip Hammond, the then defence secretary, was the first to suggest the UK was starting to attack terrorists in cyberspace, saying the country was “developing a full spectrum military cyber capability, including a strike capability”.

Could Isis’s ‘cyber caliphate’ unleash a deadly attack on key targets? Read more

However, sources said this principle has now been formalised as part of Osborne’s new cyber-strategy, to be carried out jointly by GCHQ and the Ministry of Defence, and it has moved beyond the preliminary stage announced by Hammond.

There was no confirmation that intelligence agencies are attacking any terrorists or rogue states, but it has been revealed in the past that they have helped the police disrupt criminal gangs.

During the speech, the chancellor also announced the creation of a new National Cyber Centre as he says the government is to double investment in online security to £1.9bn. There will also be new efforts to encourage 14- to 17-year-olds to develop their cyber skills and opportunities for startup companies to innovate in cyber technology at two new “hubs”.

Ministers will also lobby internet service providers to work with the government to divert more malware attacks and to block “bad addresses”, the Treasury said. Osborne was the first chancellor ever to speak at GCHQ, the intelligence agency responsible for communications, as ministers respond to the Paris terror attacks that killed at least 129 people.

On Monday night, David Cameron also gave a speech at the lord mayor’s banquet about security in which he likened the battle against extremist Islamism to Winston Churchill’s second world war fight against Adolf Hitler. Osborne has control over cybersecurity, rather than Theresa May, the home secretary, because he chairs a government committee on the issue, which can impact on economic security.