In the wake of the "WannaCry" cyberattack which resulted in widespread disruption of the UK's National Health Service (NHS), attention has now turned to other forms of infrastructure. One security expert has warned Britain's nuclear weapons are at risk of being targeted.

The UK nuclear deterrent, known as Trident, consists of four Vanguard-class submarines which can carry up to 16 ballistic missiles, each armed with up to eight warheads. Most of its computers, however, reportedly run on a legacy variant of the under-supported Windows XP operating system.

According to Sebastian Jesson-Ward, a cybersecurity expert working for UK-based Serviceteam IT, the submarines could be hit with a cyberattack in the future.

He said the submarines are most susceptible to hacking while in port and connected to the open internet.

"It is common knowledge in the cyber-security community that Trident uses the Windows XP system," Jesson-Ward told the Daily Star newspaper in an interview, published on 21 May.

He added: "It means they are vulnerable to exactly the same type of ransomware attack aimed at the NHS and other organisations.

"This is no joke because national security is being compromised by these outdated systems.

"It is true to say the subs are cyber-resilient when they are out at sea because they are not connected to the internet. But in port they are vulnerable and that is when an attack could come.

"The nightmare scenario would be for cybercriminals to infect the system in port and the bug not be detected until the sub was back out at sea and operational."

'Complete confidence' in Tident

On 14 May, UK defence secretary Michael Fallon was unable to deny the nuclear deterrent system runs Windows XP.

"We never comment on the defence systems, obviously for reasons of security, that our submarines use," he said during an interview on the BBC's Andrew Marr Show.

A Trident missile-armed Vanguard-class ballistic-missile submarine leaving its base in the Firth of Clyde, Scotland Bodgerbrooks/Flickr

Speaking following the WannaCry attacks, Fallon added: "Our Vanguard submarines, I can absolutely assure you, are safe.

"I have complete confidence in our nuclear deterrent. I can assure you the nuclear deterrent is fully protected."

A government spokesperson told IBTimes UK: "The MoD places a high priority on assuring the effectiveness of the UK strategic deterrent and managing the associated risk.

"Submarines operate in isolation by design, and we are confident that the deterrent remains safe and secure."

The ransomware strain WannaCry first hit the headlines on 12 May.

It went on to infect more than 200,000 computers in 150 countries and was built upon cyberweapons previously leaked from the US National Security Agency (NSA) by a group known as The Shadow Brokers.

Some cybersecurity experts found links to North Korean malware while analysing its code.

The computer worm hit Windows systems from XP to 10, experts said. Luckily for the computer administrators of Trident, Kaspersky Lab has revealed the majority of impacted computers were running Windows 7. Microsoft has released a patch to help solve the ongoing issues.

Most recently, the Shadow Brokers released a statement promising more NSA material will soon be released. It claimed to have computer exploits for a variety of web browsers, operating systems and "network data" from Russian, Chinese, Iranian, and North Korean nuclear missile systems.

On 3 March 2016, Fallon announced £642m ($835m) of investment for the successor submarine programme. The UK government claimed the funds will help to "progress work on the four new submarines that will begin replacing the Vanguard class, from the 2030s."

The funding will go towards new parts and facilities, as well as further design work, it added.