Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


04:48 PM
Connect Directly

Shamoon Code 'Amateur' But Effective

Researchers drill down into Shamoon targeted malware and conclude it wasn't written by programmers as seasoned as those who created Stuxnet, Duqu, Flame

The data-destroying malware Shamoon -- which has been tied to the recent attacks on Saudi Aramco that took down 30,000 workstations at the massive oil company and possibly other Middle East targets -- contains some sloppy code riddled with errors, new research shows.

Shamoon was first revealed by Symantec last month as a destructive targeted attacked aimed at a Middle East energy firm in the wake of reports that Saudi Aramco had been hit by a massive malware attack. Neither Symantec, Kaspersky Lab, AlienVault, nor Saudi Aramco will officially confirm that Shamoon was indeed the attack on Saudi Aramco, but one industry source with knowledge of the attacks told Dark Reading it was.

What set Shamoon apart from other targeted attacks was its main goal: total annihilation of data, rather than spying or stealing information. It basically wipes files and data, and cripples the infected machine. Liam O Murchu, manager of North American operations for Symantec Security Technology & Response, said last month that this brand of malicious attack hadn't been seen in 10 years, with the exception of the recent attack on the Iranian oil ministry.

Researchers at Kaspersky Lab and AlienVault Labs have picked apart Shamoon and found that it's not the same caliber of code as Stuxnet or Flame. The authors appear to be amateurs -- determined ones at that -- who may have political hacktivist motives, thanks to the discovery of a partially obscured photo of a burning American flag used to hide some of the code.

"We've got other clues that people behind creating the Shamoon malware are not high-profile programmers, and the nature of their mistakes suggests that they are amateurs, albeit skillful amateurs, as they did create a quite practicable piece of self-replicating destructive malware," says Dmitry Tarakanov, Kaspersky Lab Expert, in a new blog post today.

Jaime Blasco, manager of AlienVault Labs, says that, overall, the code is rudimentary. "From a technical point of view, the code is quite simple," Blasco says. But whether the writers were amateurs or pros all depends on how you define a professional malware operation. "Of course, [Shamoon] is not close to the complexity of Stuxnet, Duqu, or Flame, but I've seen other targeted attacks using less complex malware than Shamoon. Sometimes the attackers just want to accomplish the objective, so they don't require complex code, just the code that works for the target," he says. "And in the case of Shamoon, it seems it was able to accomplish the mission."

The most sophisticated part of the code: how the attackers employed a legitimate, digitally signed driver inside. "The only part of the system that can be mentioned is that they used a benign third-party driver -- signed -- to overwrite the files on the systems," Blasco says. That driver was signed by EldoS Corp., which provides security-related software components for software developers and the corporate market.

Among the errors in the code pinpointed by Kaspersky Lab was in Shamoon's communication module, which included a typo in the format string of the code that precludes the malware from executing other programs. "This shows at least lack of testing," Kaspersky's Tarakanov told Dark Reading.

Another error he found was a flawed dates-comparison routine, he says. "[An] experienced programmer would be ashamed [of] himself to leave the comparison code in that state as it has been done in Shamoon. There are additional conditions which cover special cases, but don't resolve the task fully. It was visible that author tried to accomplish that mission, but failed and stopped when it worked in [a] special case," he says.

The coding errors could mean lack of experience or inattention indicative of a younger coder, he says.

The fragment of a photo of a burning U.S. flag was used to overwrite the content of the files on the infected machines, says Blasco, whose firm also released new information on the malware (PDF) this month. "This can be interpreted as a message if it is confirmed that Islamic groups are behind the attack. Three different hacking groups have claimed responsibility of the attack," including the Arab Youth Group and the Cutting Sword of Justice, he says.

Kaspersky's Tarakanov concurs. "The fact that they used a picture of a fragment of a burning U.S. flag possibly shows that the motive of Shamoon's authors is to create and use malware in a politically driven way. Moreover, they wished that their protest, which was embedded into the malware, would not go unnoticed," Tarakanov says.

But the fragmented photo of the flag could also have been "just for trolling," he told Dark Reading.

And Shamoon was no Wiper, the targeted malware aimed at taking down machines in Iranian businesses, according to Kaspersky Lab. "By all appearances, the Shamoon author/s encountered the same issue like The Wiper authors. In the modern world, it's time-consuming to fill an entire disk even with fixed data. To have the wiping done a bit quicker but efficiently, it is not necessary to wipe all the data but to rewrite parts dispersively throughout the disk. The Wiper authors completed this task fairly smartly, whereas in Shamoon it's done rather crudely," Tarakanov wrote.

[ Oil company's revelation matches counts by hackers claiming responsibility and Shamoon connection. See 30,000 Machines Infected In Targeted Attack On Saudi Aramco. ]

Meanwhile, Saudi Aramco yesterday released a press statement that its network is back up and running after the massive virus attack it suffered last month, and that the company has beefed up its network security systems as well as other security features in its environment. Saudi Aramco also repeated its previous comment that none of its oil and gas operations were interrupted or affected by the virus.

"The virus, which only affected personal workstations in the company, had no significant impact on the company's administrative operations or the productivity of its employees. This was achieved through restoring the affected workstations in a fast and effective manner and in time for employees returning to work after the 'Id holiday. Internal email services were also restored in a timely manner by the company's experts," the statement said.

Have a comment on this story? Please click "Add Your Comment" below. If you'd like to contact Dark Reading's editors directly, send us a message. Kelly Jackson Higgins is the Executive Editor of Dark Reading. She is an award-winning veteran technology and business journalist with more than two decades of experience in reporting and editing for various publications, including Network Computing, Secure Enterprise ... View Full Bio

Comment  | 
Print  | 
More Insights
Threaded  |  Newest First  |  Oldest First
Data Privacy Protections for the Most Vulnerable -- Children
Dimitri Sirota, Founder & CEO of BigID,  10/17/2019
Sodinokibi Ransomware: Where Attackers' Money Goes
Kelly Sheridan, Staff Editor, Dark Reading,  10/15/2019
Register for Dark Reading Newsletters
White Papers
Current Issue
7 Threats & Disruptive Forces Changing the Face of Cybersecurity
This Dark Reading Tech Digest gives an in-depth look at the biggest emerging threats and disruptive forces that are changing the face of cybersecurity today.
Flash Poll
2019 Online Malware and Threats
2019 Online Malware and Threats
As cyberattacks become more frequent and more sophisticated, enterprise security teams are under unprecedented pressure to respond. Is your organization ready?
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
PUBLISHED: 2019-10-19
The Video_Converter app 0.1.0 for Nextcloud allows denial of service (CPU and memory consumption) via multiple concurrent conversions because many FFmpeg processes may be running at once. (The workload is not queued for serial execution.)
PUBLISHED: 2019-10-19
Information Disclosure is possible on WAGO Series PFC100 and PFC200 devices before FW12 due to improper access control. A remote attacker can check for the existence of paths and file names via crafted HTTP requests.
PUBLISHED: 2019-10-19
templates/pad.html in Etherpad-Lite 1.7.5 has XSS when the browser does not encode the path of the URL, as demonstrated by Internet Explorer.
PUBLISHED: 2019-10-18
In the Linux kernel before 5.3.4, a reference count usage error in the fib6_rule_suppress() function in the fib6 suppression feature of net/ipv6/fib6_rules.c, when handling the FIB_LOOKUP_NOREF flag, can be exploited by a local attacker to corrupt memory, aka CID-ca7a03c41753.
PUBLISHED: 2019-10-18
In xsltCopyText in transform.c in libxslt 1.1.33, a pointer variable isn't reset under certain circumstances. If the relevant memory area happened to be freed and reused in a certain way, a bounds check could fail and memory outside a buffer could be written to, or uninitialized data could be disclo...