The Trump administration has publicly blamed North Korea for unleashing the so-called WannaCry cyber attack that crippled hospitals, banks and other companies around the world earlier this year.

In a piece published in the Wall Street Journal, US homeland security adviser Tom Bossert accused North Korea of being directly responsible for the attack.

"North Korea has acted especially badly, largely unchecked, for more than a decade, and its malicious behaviour is growing more egregious," Mr Bossert wrote. "WannaCry was indiscriminately reckless."

The White House is today expected to follow-up with a more formal statement blaming Pyongyang, according to a senior administration official, who spoke on condition of anonymity to discuss details of the government’s investigation.

The official said the government has assessed with a "very high level of confidence" that a hacking entity known as Lazarus Group, which works on behalf of the North Korean government, carried out the WannaCry attack.

Lazarus Group is widely believed by security researchers and US officials to have been responsible for the 2014 hack of Sony Pictures Entertainment that destroyed files, leaked corporate communications online and led to the departure of several top studio executives.

North Korean government representatives could not be immediately reached for comment.

The country has repeatedly denied responsibility for WannaCry and called other allegations about cyber attacks a smear campaign.

Washington's public condemnation does not include any indictments or name specific individuals, the administration official said, adding the shaming was designed to hold Pyongyang accountable for its actions and "erode and undercut their ability to launch attacks".

The accusation comes as worries mount about North Korea's hacking capabilities and its nuclear weapons programme.