An Overview of the Industrial Worm Called StuxNet

By www.casecomms.com
Hosted at: EmbeddedSw - Security News

Introduction

StuxNet is a computer worm discovered in June 2010. StuxNet initially spreads via Microsoft Windows, and targets Siemens industrial software and equipment. While it is not the first time that hackers have targeted industrial systems, it is the first discovered malware that spies on and subverts industrial systems, and the first to include a programmable logic controller (PLC) rootkit.

The worm initially spreads indiscriminately, but includes a highly specialized malware payload that is designed to target only Siemens supervisory control and data acquisition (SCADA) systems that are configured to control and monitor specific industrial processes. StuxNet infects PLCs by subverting the Step-7 software application that is used to reprogram these devices.

Different variants of StuxNet targeted five Iranian organisations, with the probable target widely suspected to be uranium enrichment infrastructure in Iran; Symantec noted in August 2010 that 60% of the infected computers worldwide were in Iran.

Siemens stated on 29 November that the worm has not caused any damage to its customers, but the Iran nuclear program, which uses embargoed Siemens equipment procured secretly, has been damaged by StuxNet.

Kaspersky Lab concluded that the sophisticated attack could only have been conducted "with nation-state support". This was further supported by the F-Secure's chief researcher Mikko Hypponen who commented in a StuxNet FAQ, "That's what it would look like, yes".

It has been speculated that Israel and the United States may have been involved.

In May 2011, the PBS program Need To Know cited a statement by Gary Samore, White House Coordinator for Arms Control and Weapons of Mass Destruction, in which he said, "we're glad they [the Iranians] are having trouble with their centrifuge machine and that we - the US and its allies - are doing everything we can to make sure that we complicate matters for them", offering "winking acknowledgement" of US involvement in StuxNet.

On 1 June 2012, an article in The New York Times said that StuxNet is part of a U.S. and Israeli intelligence operation called "Operation Olympic Games", started under President George W. Bush and expanded under President Barack Obama.

Operation

Unlike most malware, StuxNet does little harm to computers and networks that do not meet specific configuration requirements; "The attackers took great care to make sure that only their designated targets were hit...It was a marksman's job." While the worm is promiscuous, it makes itself inert if Siemens software is not found on infected computers, and contains safeguards to prevent each infected computer from spreading the worm to more than three others, and to erase itself on 24 June 2012.

For its targets, StuxNet contains, among other things, code for a man-in-the-middle attack that fakes industrial process control sensor signals so an infected system does not shut down due to abnormal behaviour. Such complexity is very unusual for malware. The worm consists of a layered attack against three different systems:

  1. The Windows operating system,
  2. Siemens PCS 7, WinCC and STEP7 industrial software applications that run on Windows, and
  3. One or more Siemens S7 PLCs.

Windows infection

StuxNet attacked Windows systems using an unprecedented four zero-day attacks (plus the CPLINK vulnerability and a vulnerability used by the Conficker worm). It is initially spread using infected removable drives such as USB flash drives, and then uses other exploits and techniques such as peer-to-peer RPC to infect and update other computers inside private networks that are not directly connected to the Internet. The number of zero-day Windows exploits used is unusual, as they are valued, and crackers do not normally waste the use of four different ones in the same worm. StuxNet is unusually large at half a megabyte in size, and written in several different programming languages (including C and C++) which is also irregular for malware. The Windows component of the malware is promiscuous in that it spreads relatively quickly and indiscriminately.

The malware has both user-mode and kernel-mode rootkit capability under Windows, and its device drivers have been digitally signed with the private keys of two certificates that were stolen from separate companies, JMicron and Realtek, that are both located at Hsinchu Science Park in Taiwan. The driver signing helped it install kernel-mode rootkit drivers successfully and therefore remain undetected for a relatively long period of time.[36] Both compromised certificates have been revoked by VeriSign.

Two websites in Denmark and Malaysia were configured as command and control servers for the malware, allowing it to be updated, and for industrial espionage to be conducted by uploading information. Both of these websites have subsequently been taken down as part of a global effort to disable the malware.

Step 7 software infection

According to researcher Ralph Langner, once installed on a Windows system StuxNet infects project files belonging to Siemens' WinCC/PCS 7 SCADA control software (Step 7), and subverts a key communication library of WinCC called S7otbxdx.d11 Doing so intercepts communications between the WinCC software running under Windows and the target Siemens PLC devices that the software is able to configure and program when the two are connected via a data cable. In this way, the malware is able to install itself on PLC devices unnoticed, and subsequently to mask its presence from WinCC if the control software attempts to read an infected block of memory from the PLC system.

The malware furthermore used a zero-day exploit in the WinCC/SCADA database software in the form of a hard-coded database password.

PLC infection

The entirety of the StuxNet code has not yet been disclosed, but its payload targets only those SCADA configurations that meet criteria that it is programmed to identify. StuxNet requires specific slave variable-frequency drives (frequency converter drives) to be attached to the targeted Siemens S7-300 system and its associated modules.

It only attacks those PLC systems with variable-frequency drives from two specific vendors: Vacon based in Finland and Fararo Paya based in Iran. Furthermore, it monitors the frequency of the attached motors, and only attacks systems that spin between 807 Hz and 1210 Hz. The industrial applications of motors with these parameters are diverse, and may include pumps or gas centrifuges.

StuxNet installs malware into memory block DB890 of the PLC that monitors the Profibus messaging bus of the system. When certain criteria are met, it periodically modifies the frequency to 1410 Hz and then to 2 Hz and then to 1064 Hz, and thus affects the operation of the connected motors by changing their rotational speed. It also installs a rootkit-the first such documented case on this platform-that hides the malware on the system and masks the changes in rotational speed from monitoring systems.

Removal

Siemens has released a detection and removal tool for StuxNet. Siemens recommends contacting customer support if an infection is detected and advises installing Microsoft patches for security vulnerabilities and prohibiting the use of third-party USB flash drives. Siemens also advises immediately upgrading password access codes.

The worm's ability to reprogram external PLCs may complicate the removal procedure. Symantec's Liam O'Murchu warns that fixing Windows systems may not completely solve the infection; a thorough audit of PLCs may be necessary. Despite speculation that incorrect removal of the worm could cause damage, Siemens reports that in the first four months since discovery, the malware was successfully removed from the systems of twenty-two customers without any adverse impact.

Control system security

Prevention of control system security incidents, such as from viral infections like StuxNet, is a topic that is being addressed in both the public and the private sector.

The U.S. Department of Homeland Security National Cyber Security Division (NCSD) operates the Control System Security Program (CSSP).

The program operates a specialized Computer Emergency Response Team (ICS-CERT), conducts a biannual conference (ICSJWG), provides training, publishes recommended practices, and provides a self-assessment tool. As part of a Department of Homeland Security plan to improve American computer security, in 2008 it and the Idaho National Laboratory (INL) worked with Siemens to identify security holes in the company's widely used Process Control System 7 (PCS 7) and its software Step 7. In July 2008 INL and Siemens publicly announced flaws in the control system at a Chicago conference; StuxNet exploited these holes in 2009.

Several industry organisations and professional societies have published standards and best practice guidelines providing direction and guidance for control system end-users on how to establish a Control System Security management program. The basic premise that all of these documents share is that prevention requires a multi-layered approach, often referred to as "defence-in-depth". The layers include policies & procedures, awareness & training, network segmentation, access control measures, physical security measures, system hardening, e.g., patch management, and system monitoring, anti-virus and IPS. The standards and best practices also all recommend starting with a risk analysis and a control system security assessment.

Speculations about the target and origin

Experts believe that StuxNet required the largest and costliest development effort in malware history. Its many capabilities would have required a team of people to program, in-depth knowledge of industrial processes, and an interest in attacking industrial infrastructure.

Symantec estimates that the group developing StuxNet would have consisted of anywhere from five to thirty people, and would have taken six months to prepare.

The Guardian, the BBC and The New York Times all claimed that (unnamed) experts studying StuxNet believe the complexity of the code indicates that only a nation-state would have the capabilities to produce it. The self-destruct and other safeguards within the code imply that a Western government was responsible, with lawyers evaluating the worm's ramifications.

Software security expert Bruce Schneier condemned the 2010 news coverage of StuxNet as hype, however, stating that it was almost entirely based on speculation. But after subsequent research, Schneier stated in 2012 that "we can now conclusively link StuxNet to the centrifuge structure at the Natanz nuclear enrichment lab in Iran".

Joint effort and other states and targets

In April 2011 Iranian government official Gholam Reza Jalali stated that an investigation had concluded that the United States and Israel were behind the StuxNet attack.

According to Vanity Fair, Rieger stated that three European countries' intelligence agencies agreed that StuxNet was a joint United States-Israel effort. The code for the Windows injector and the PLC payload differ in style, likely implying collaboration. Other experts believe that a US-Israel cooperation is unlikely because "the level of trust between the two countries' intelligence and military establishments is not high."

China, Jordan, and France are other possibilities, and Siemens may have also participated. Langner speculated that the infection may have spread from USB drives belonging to Russian contractors since the Iranian targets were not accessible via the internet.

Sandro Gaycken from the Free University Berlin argued that the attack on Iran was a ruse to distract from StuxNet's real purpose. According to him, its broad dissemination in more than 100,000 industrial plants worldwide suggests a field test of a cyber-weapon in different security cultures, testing their preparedness, resilience, and reactions, all highly valuable information for a cyberwar unit.

The United Kingdom has denied involvement in the virus's creation.

Stratfor Documents released by Wikileaks suggest that the International Security Firm 'Stratfor' believe that Israel is behind StuxNet - "But we can't assume that because they did StuxNet that they are capable of doing this blast as well."

Duqu

On 1 September 2011, a new worm was found, thought to be related to StuxNet. The Laboratory of Cryptography and System Security (CrySyS) of the Budapest University of Technology and Economics analysed the malware, naming the threat Duqu. Symantec, based on this report, continued the analysis of the threat, calling it "nearly identical to StuxNet, but with a completely different purpose", and published a detailed technical paper.

The main component used in Duqu is designed to capture information such as keystrokes and system information. The exfiltrated data may be used to enable a future StuxNet-like attack. On 28 December 2011, Kaspersky Lab's director of global research and analysis spoke to Reuters about recent research results showing the platform, StuxNet and Duqu both were built on, originated in 2007 and is being referred to as Tilded, due to the ~d at the beginning of the file names. Also uncovered in this research was the possibility for three more variants based on the Tilded platform.

Flame

In May 2012, the new malware "Flame" was found, thought to be related to StuxNet. Researchers named the program "Flame" after the name of one of its modules. After analysing the code of Flame, Kaspersky said that there is a strong relationship between Flame and StuxNet. An early version of StuxNet contained code to propagate infections via USB drives that is nearly identical to a Flame module that exploits the same zero-day vulnerability.

UPDATE - June 2012: Source code smoking gun links StuxNet and Flame

A direct link exists between the infamous uranium enrichment sabotage worm StuxNet and the newly uncovered Flame mega-malware, researchers have claimed.

Russian virus protection outfit Kaspersky Lab said in a blog post yesterday that although two separate teams worked on StuxNet and Flame, the viruses' programmers "cooperated at least once during the early stages of development".

The smoking gun, in the lab's opinion, is a component in an early build of StuxNet that appears in Flame as a plugin.

The New York Times revealed this month that StuxNet's infiltration of Iran's nuclear programme, and subsequent knackering of the Middle East nation's uranium centrifuges, was a joint effort by US and Israel. The project, publicly uncovered in June 2010, was initiated by the Bush administration and continued under President Barack Obama.

StuxNet, which notoriously exploited previously unknown security vulnerabilities in Microsoft Windows to gain access to industrial control systems, was long believed to be state-sponsored and developed by an American-Israeli alliance.

Meanwhile the Flame malware - a sophisticated data-stealing worm that has also been burning through computers in the Middle East and beyond - was active for up to two years before being unearthed by security experts in May this year. A self-destruct command was issued to the espionage virus by its shadowy handlers last week, and to us on the security desk at Vulture Central that sounds an awful lot like a James Bond mission gone wrong.

Here's a quick rundown of what Kaspersky Lab found during its research:

Importantly, according to Kaspersky Lab's investigation, the Resource 207 module - an encrypted DLL file - contained a 341,768-byte executable file named atmpsvcn.ocx that has lots in common with the code used in the Flame malware.

"The list of striking resemblances includes the names of mutually exclusive objects, the algorithm used to decrypt strings, and the similar approaches to file naming," the security experts added.

Kaspersky Lab's chief boffin Alexander Gostev noted that completely different development platforms had been used to craft the separate viruses.

"The projects were indeed separate and independent from each other. However, the new findings that reveal how the teams shared source code of at least one module in the early stages of development prove that the groups cooperated at least once. What we have found is very strong evidence that StuxNet/Duqu and Flame cyber-weapons are connected," he said.