Stuxnet: Technical Analysis of Siemens S7 PLC Cyberattack

David Krause12 min read
Industrial NetworkingSiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview: Stuxnet and the Siemens PLC Attack Vector

Stuxnet is a state-sponsored, multi-component computer worm first identified on 17 June 2010 by the Belarusian antivirus firm VirusBlokAda after a sample was submitted from Iran. Reverse engineering by Symantec, Kaspersky Lab, and Langner Communications established it as the first publicly analyzed cyber weapon specifically engineered to subvert industrial control systems — in particular, Siemens SIMATIC S7-300 and S7-400 programmable logic controllers running STEP 7 and the PCS 7 (Process Control System 7) engineering framework.

The attack targeted Programmable Logic Controllers (PLCs) connected to frequency-converter drives operating between 807 Hz and 1210 Hz, an output band associated with uranium-enrichment centrifuges. Its significance for industrial automation engineers, however, extends well beyond the original target. Stuxnet provided a reproducible blueprint for injecting malicious Statement List (STL) code into Siemens S7 CPUs, manipulating drive parameters in real time, and spoofing Human-Machine Interface (HMI) telemetry so the disturbance remained invisible to operators. Modern threat intelligence — most notably CISA Advisory AA26-097A on Iranian-affiliated actors targeting PLCs — confirms that the tradecraft demonstrated by Stuxnet remains in active use more than a decade after discovery.

This document is an engineering reference for defenders. It describes attack mechanics so automation engineers can build detection and hardening controls. It is not a tutorial for offensive use.

Affected Siemens Hardware and Software

Component Role in Attack Notes
SIMATIC S7-300 family (incl. CPU 315-2 DP) Primary target CPU for payload injection Used in Symantec lab reproduction with one SM digital I/O module and a single OB1 network (one timer, one output)
SIMATIC S7-400 family (incl. CPU 414H / 417H) Redundant H-CPU target; field reports of unexplained simultaneous pair failures H-system assemblies cost €15,000–€30,000 per pair; field failures documented in engineering forums
SIMATIC WinCC / PCS 7 Engineering station and HMI software; STEP 7 project format V7.0+ versions were the engineering target; WinCC database exploit delivered one of four zero-days
STEP 7 programming software Project file (.s7p / .s7l) manipulation Malicious library inserted into project to be deployed to the S7 CPU
SIMATIC HMI Panels (MP/TP/OP) Telemetry display Spoofed readings displayed to operators during payload execution
PROFIBUS DP segments Fieldbus connecting S7 master to drives Used as the man-in-the-middle surface for read-response spoofing

Per the W32 Stuxnet Dossier published by Symantec, the payload was designed to inject code into SIMATIC S7-300/400 PLCs reached through STEP 7 engineering stations on the OT network. The worm did not attack every S7 CPU indiscriminately — it profiled the connected PROFIBUS DP slaves before triggering any code-injection step. Defenders should treat any S7-300/400 installation connected to variable-frequency drives as in-scope for Stuxnet-class threats.

Frequency-Converter Targeting Profile

Stuxnet's most distinctive fingerprint was its drive-frequency gating logic. Per the Symantec dossier, the payload checked for the following conditions on the connected PROFIBUS network before activating its destructive mode:

  1. At least 33 frequency-converter drives from one of two vendors: Vacon (Finland) or Fararo Paya (Tehran, Iran).
  2. Drives operating at an output frequency within 807 Hz to 1210 Hz.
  3. Drives connected to Siemens S7-300/400 CPUs over PROFIBUS DP.

Industrial drives above 600 Hz are export-controlled by the U.S. Nuclear Regulatory Commission because gas-centrifuge uranium enrichment uses that operating band. Engineers building threat models for any S7-300/400 installation should treat 807–1210 Hz setpoints as sensitive configuration data and alert on any drive entering that range, regardless of whether the installation is enrichment-related.

Trigger Parameter Stuxnet Value Field Interpretation
Drive vendor Vacon (Finland) / Fararo Paya (Iran) Specific vendor fingerprint in PLC scan
Output frequency window 807 Hz – 1210 Hz High-speed centrifuge band; NRC export-controlled above 600 Hz
Minimum drive count 33 Cascade size threshold for payload activation
PLC family SIMATIC S7-300 / S7-400 PROFIBUS DP master requirement
Network propagation PROFIBUS DP Fieldbus read/write used for payload and spoofing

Attack Chain: From USB to STL Code on the S7 CPU

Stuxnet propagated through four distinct layers. Understanding each layer is essential for defenders designing layered OT security.

Layer 1 — Windows Host Infection

Stuxnet entered secured environments through removable media. It exploited a Windows shell .lnk-file parsing vulnerability (CVE-2010-2568) to autorun when a USB drive was opened in Windows Explorer. Once resident on the engineering workstation, it escalated privileges using a separate Windows zero-day, then propagated laterally over SMB network shares using a print-spooler exploit (CVE-2010-2729). Two additional zero-day exploits targeted the WinCC SQL database and the STEP 7 project file format — the latter being the only known in-the-wild exploit of an ICS engineering file format at the time.

Layer 2 — STEP 7 Project Compromise

Stuxnet searched the engineering station's file system for STEP 7 project files. When found, it injected a maliciously signed STEP 7 library into the project. The library contained a Windows DLL that would later be downloaded into the S7 CPU as a function block. This step exploited the trust relationship between the engineering station (PC) and the PLC — the PLC executes whatever project the engineering station pushes.

Layer 3 — PLC Code Injection

The malicious DLL used the STEP 7 communications library (s7otbxdx.dll) to read and write blocks on the target S7 CPU. It replaced legitimate STL blocks (FC, FB, OB, DB) with modified versions. The replacement STL redirected drive-frequency setpoints and altered rotor-acceleration profiles to drive the connected process through destructive ramp cycles. Critically, it also intercepted the PROFIBUS DP read responses so the engineering workstation and HMI continued to see the original, unmodified values — a man-in-the-middle spoofing attack against the control loop itself.

Layer 4 — Damage and Concealment

Per the Langner Communications analysis, the payload recorded normal operating data via the WinCC HMI for a period, then replayed those recordings to plant operators while driving the actual process (centrifuges) through destructive ramp/overspeed cycles. Centrifuge rotors either tore themselves apart or suffered bearing and rotor fatigue far in excess of normal wear. Public reporting attributed roughly 1,000 destroyed centrifuges at Natanz to the Stuxnet campaign.

Symantec's laboratory reproduction used a SIMATIC S7-315-2 DP with one SM digital I/O module and a minimal OB1 program (one timer, one output) — no PROFIBUS, no CP343. The reproduction confirmed that minimal STEP 7 programs are sufficient to demonstrate the injection technique. There is no minimum program complexity required for the attack to succeed; defenses cannot rely on obscurity.

STL Code Indicators of Compromise

Engineers auditing legacy STEP 7 projects should treat the following constructs as triggers for further investigation. Presence of these indicators does not prove compromise, but does require review.

Indicator What to Search Risk
Data block DB890 or any unrecognized high-numbered DB STEP 7 cross-reference; symbol table review Community-reported IoC for Stuxnet-affected projects
Unrecognized S7 block libraries in the project Compare .s7l / .s7p project hashes against a vendor-issued baseline Possible payload library inserted into the project
Untrusted digital signatures inside the STEP 7 project Verify the signature chain against the Siemens root certificate Indicates an injected library with attacker-controlled signing material
Unexpected OB1 / OB35 cycle-time or organization-block content changes Compare against last-known-good project archive Possible payload trigger or scheduled execution
Unexpected calls to s7otbxdx.dll from non-STEP 7 processes Process monitor on the engineering workstation Possible STEP 7 communications library abuse

Engineers may also encounter Siemens support note ID 24200966, which documents a separate but commonly confused issue: the "Your software license has expired. Please obtain a valid license" message on Floating License servers where a Trial License is also active. While not a Stuxnet artifact, it is a recurring engineering-workstation symptom that defenders can misattribute to malware. Reset the trial license per the Siemens support article when the cause is benign.

Redundant S7-400H Failures: Engineering Considerations

Field reports from the period following Stuxnet's public disclosure documented simultaneous failures of redundant S7-414H and S7-417H CPU pairs in the field, with single-assembly replacement costs of €15,000–€30,000. Whether or not Stuxnet was the proximate cause in every case, engineering teams managing critical S7-400H installations should adopt the following defensive measures:

  1. Maintain a cryptographic hash baseline (SHA-256 or stronger) of every S7 block library currently loaded on the H-CPU pair. Re-hash after every project download and alert on drift.
  2. Enforce signed project workflows. Refuse any download originating from an engineering station that does not present a valid Siemens-issued project signature.
  3. Use the physical hardware key switch on the CPU faceplate (RUN / RUN-P / STOP) to block remote program changes. This is the control Long-term OT security researchers have advocated since the Stuxnet disclosure.
  4. Physically lock the redundant pair's PCMCIA / SIMATIC Micro Memory Card (MMC) and compare card hashes against the master image on a quarterly cadence.
  5. Audit PROFIBUS DP slave count, drive vendor, and drive frequency setpoints against the Stuxnet trigger table in this document. Anomalies warrant investigation.
  6. Segment the engineering workstation from the corporate network through a Demilitarized Zone (DMZ) with strict unidirectional gateway rules.

Modern Threat Landscape: Iranian-Affiliated PLC Intrusions

The tradecraft pioneered by Stuxnet remains in active use. CISA Advisory AA26-097A, "Iranian-Affiliated Cyber Actors Exploit Programmable Logic Controllers," documents ongoing activity against U.S. organizations. Defenders managing Siemens, Allen-Bradley, and Schneider Electric PLCs should review the IOCs in that advisory for both historical and current activity.

Adversary tradecraft has evolved in two directions since 2010:

  • Living-off-the-land techniques. Modern actors abuse legitimate engineering tools (STEP 7, TIA Portal, EcoStruxure Control Expert) to push modified logic to PLCs without dropping traditional malware. This makes signature-based detection on the engineering workstation unreliable.
  • Firmware-level implants. Persistent implants survive project republishing, requiring the affected PLC to be reflashed from a cryptographically verified clean image after recovery.

The 2010 Stuxnet research — specifically the W32 Stuxnet Dossier from Symantec and the Langner Communications analysis — remains the canonical public reference for these TTPs. Engineers building detection content around PLC integrity should treat these documents as foundation reading, not historical curiosity.

Defensive Hardening Checklist

Layer Control Implementation
Network OT/IT segmentation Deploy a DMZ between WinCC / STEP 7 engineering stations and the corporate network; strict unidirectional gateway
Host Application whitelisting Lock down engineering workstations; allow only signed STEP 7 and WinCC binaries
Removable media Disable USB autorun Apply Microsoft MS10-046 patch for CVE-2010-2568; disable autorun via Group Policy; physical port locks
Engineering workflow Project signing Enable STEP 7 project signature verification; reject unsigned project downloads at the engineering station
PLC Hardware key switch Use RUN-P / STOP physical switch to prevent remote program changes
PLC Block integrity monitoring Compare FC/FB/DB/OB CRC against baseline after every project download
PLC CPU password protection Configure CPU password and "know-how protect" on every block
Drive Frequency range alert Alert on any drive operating point above 600 Hz; investigate any drive in the 807–1210 Hz window
Drive Vendor inventory Maintain a current inventory of all VFDs; alert on Vacon or Fararo Paya drives if present in critical infrastructure

Verification Steps After Suspected Exposure

  1. Pull the engineering workstation off the OT network and image it for forensic analysis before any reboot.
  2. Export the active S7 project from the affected CPU and diff the FC / FB / DB / OB blocks against the last-known-good archive.
  3. Check the affected PROFIBUS DP segments against the Stuxnet trigger table (≥ 33 drives, Vacon or Fararo Paya, 807–1210 Hz).
  4. Verify CPU password protection and the hardware key-switch position on every S7-300/400 in the affected cell.
  5. Re-flash the affected CPU from a clean STEP 7 project; do not trust the in-place program image or any active project file.
  6. Review physical security of the cabinet — Stuxnet's USB vector requires local access, so an exposed cabinet is a finding.
  7. Review all WinCC and PCS 7 stations for the four zero-day indicators from the W32 Stuxnet Dossier.

Detection Engineering: What to Alert On

Build detection content around behavioral anomalies rather than signatures. The following alerts will catch Stuxnet-class activity with low false-positive rates in production PCS 7 environments:

  • Any STEP 7 project download that does not match the SHA-256 hash of the archived last-known-good project.
  • Any FC / FB / DB / OB block whose CRC drifts from the engineering archive after a project download.
  • Any drive output frequency setpoint entering the 807–1210 Hz window without a corresponding change request ticket.
  • Any PROFIBUS DP slave appearing with vendor identification matching Vacon or Fararo Paya, where no such device exists in the asset inventory.
  • Any engineering workstation process (step7.exe, s7otbxdx.dll host) opening outbound SMB or WinCC-SQL connections outside scheduled maintenance windows.
  • Any s7otbxdx.dll load from a process other than step7.exe or wincc.exe.

Standards and Engineering References

The following standards inform a defense-in-depth, Stuxnet-aware architecture. Engineers should consult the current edition of each before specifying controls.

  • IEC 62443 — Industrial Communication Networks – Network and System Security. Parts 3-3 (system security requirements and security levels) and 4-2 (component security technical requirements for PLCs) are directly applicable.
  • NIST SP 800-82 Rev. 2 — Guide to Industrial Control Systems (ICS) Security.
  • Siemens Industrial Security Portal and the active Siemens Security Advisories (SSA) for SIMATIC S7 and PCS 7.
  • CISA Advisory AA26-097A — Iranian-Affiliated Cyber Actors Exploit Programmable Logic Controllers.

FAQ

What Siemens PLCs did Stuxnet specifically target?

Stuxnet targeted SIMATIC S7-300 and S7-400 PLCs (including the redundant S7-414H and S7-417H variants) running STEP 7 or PCS 7 engineering software. The Symantec laboratory reproduction used an S7-315-2 DP with a single digital I/O module and a minimal OB1 program (one timer, one output), demonstrating that program complexity is not a defense against code injection.

What frequency-converter drives did Stuxnet attack?

Stuxnet specifically targeted Vacon (Finland) and Fararo Paya (Tehran) frequency converters operating between 807 Hz and 1210 Hz output frequency. This range is consistent with uranium-enrichment centrifuges; drives above 600 Hz are export-controlled by the U.S. Nuclear Regulatory Commission. Engineers should treat 807–1210 Hz setpoints as a sensitive configuration in any threat model.

What is DB890 and why is it significant?

DB890 is a data-block name reported in Stuxnet-affected STEP 7 projects. Finding an unrecognized high-numbered DB in a STEP 7 project — particularly one with no associated symbol or no matching entry in the change-control archive — is a trigger for further investigation. It is not a definitive indicator of compromise but warrants a block-by-block review.

How did Stuxnet hide its effects from operators?

Stuxnet recorded normal plant telemetry to the WinCC HMI, then replayed those recordings to plant operators while simultaneously driving the actual process (centrifuges) through destructive ramp profiles. The attack executed a man-in-the-middle spoofing of the PROFIBUS DP read responses between the S7 CPU and the engineering workstation, so the engineering station also saw the original values.

Is Stuxnet still a relevant threat to modern Siemens PLCs?

Yes. CISA Advisory AA26-097A documents ongoing Iranian-affiliated activity against U.S. PLCs using techniques that descend directly from Stuxnet, including abuse of legitimate engineering tools and firmware-level implants. The W32 Stuxnet Dossier from Symantec and the Langner Communications analysis remain required reading for any OT security engineer designing detection content for PLC integrity.

Back to blog