Saudi Arabia's government agencies were hit with a cyberattack that security researchers are blaming on a worm-like malware that can wipe computer systems, destroying data.

Several government bodies and vital installations suffered the attack, disrupting their servers, the country's Saudi Press Agency said on Thursday. The transportation sector was among the agencies hit by an actor from outside the country, the press agency said.

Security firms say the attack involved malware called Shamoon or Disttrack that was previously found targeting a Saudi Arabian oil company four years ago. That attack disabled 30,000 computers.

This latest attack involved the malware acting as a time bomb. Samples of the malicious coding were configured to begin wiping data at 8:45 p.m. local time Nov. 17, the end of the work week in the country, according to security firm Symantec.

“The malware was configured with passwords that appear to have been stolen from the targeted organizations,” Symantec said in a blog post. “How the attackers obtained the stolen credentials is unknown.”

The Shamoon malware works by spreading across the victim's network and copying itself to new computers. This new variant of the malware uses a system-wiping function that will overwrite a hard disk and replace the data with the image of a 3-year-old Syrian refugee boy who drowned in the Mediterranean Sea last year.

To gain access to the stolen passwords that the malware used, the hackers behind Shamoon may have sent phishing emails to their targets, tricking them into giving up their credentials, Palo Alto Networks said. Or the hackers may have already had inside access, it said.

It's unclear who pulled off the attack, but the malware is similar to the older version of Shamoon used in the 2012 attack against the Saudi Arabian oil company, security firms said. That version overwrote the infected hard disks with images of a burning U.S. flag.

A hacktivist group called Cutting Sword of Justice claimed responsibility for the 2012 attack, but U.S. investigators have suspected that Iran was involved. Iran has denied any ties to that attack.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.