Tag Archives: Siemens

Responding to Wana Decrypt0r / WanaCrypt0r Infections

As I am sure you are aware earlier this week a new variant of ransomware named WanaCrypt0r began to infect many systems worldwide using the vulnerability patched in March 2017. The infections were especially severe in the UK (hospitals were affected), Spain (banks, the ISP Telefonica and gas/electricity providers) among many others. The infections were spreading in a worm (defined) like fashion.

The ransomware uses the vulnerability exploited by the “Eternal Blue” exploit patched by Microsoft in Mach by their MS17-010 update. This exploit uses the SMBv1 (defined) protocol to enter a vulnerable system over port 445 (when that port is accessible from the internet). In some instances the CERT of Spain have observed the exploit installing the DoublePulsar malware on the already infected system. A live map of this malware’s global infections is available here. Once the malware obtains access to your system it installs the WanaCrypt0r ransomware to encrypt your files. As detailed by BleepingComputer it also terminates active databases and email servers so that it can encrypt them also.

On the 12th of May, the spread of the malware was temporarily halted by the actions of the malware researcher known as MalwareTech. They registered a website domain the malware checks if it exists while installing itself on your system. If it exists, it halts its installation and doesn’t encrypt your data (acting like a “kill switch”). I use the word temporary above since as the researcher points out all the malware authors need to do is to choose a different domain and re-release the updated malware (or worse they could use a domain generation algorithm (DGA)(defined) to make registering the websites by researchers even harder). The purpose of the malware checking if this domain was registered is to check if it is running inside a malware sandbox (defined).

How can I protect myself from this threat?
If you have not already done so, please install the MS17-010 security update (released in March 2017) on your Windows based servers and workstations. Researchers are simply saying “patch your systems” and that is what they mean. Microsoft discusses this advice in more detail in their MSRC blog post.

A full list of the versions of Windows affected by vulnerabilities patched within MS17-010 is provided at the end of this post.

If you are not sure how to update your systems, the following links below will assist if you are consumer/small business. Larger corporations should check with their IT team/system administrators install this update. If you can, please install all other remaining security updates:

Windows Vista

Windows 7

Windows 8.1

Windows 10

Microsoft have since released the MS17-010 update for all other remaining out of support Windows systems namely Windows XP, Windows Server 2003 and Windows 8.0. They are available as direct downloads from their MSRC blog post. I checked earlier today and these updates were not being offered by Windows Update and Automatic Updates for those older versions of Windows, please obtain the updates directly from their MSRC blog post.

While the “kill switch”for this malware was used (as mentioned above), it is very likely to return in the future. The steps below will better prepare you now and for the future.

I am aware Windows Vista is out of support at this time but it was supported when the MS17-010 update was released.

Update: 15th May 2017:
It is appears a new variant (Uiwix) of this threat is now circulating which does not have a kill switch. This variant does not appear to spread using a different vulnerability. Other variants are currently in-progress.

Update: 18th May 2017:
As mentioned above, newer variants of this malware are being made available. They exploit the same vulnerability as WannaCry but don’t spread in a worm like fashion.

I would suggest installing the MS17-010 as soon as possible since further ransomware is likely to capitalise on many devices (approximately 1 million still exposing the SMB protocol to the internet, with roughly 800k being Windows devices).

Moreover, the ShadowBrokers may release more exploits next month (and continue to do so on a regular basis) but this time we are unlikely to have security updates ready for them. My advice is to be prepared in June.

Thank you.

Update: 21st May 2017:
The Eternals Rocks worm is now also spreading by exploiting exposed systems over SMB. The advice below to block installation of WannaCrypt should prevent infection of your systems. At this time, the worm is not carrying out malicious actions with infected devices. Instead it is setting up a C&C (C2)(defined) infrastructure and may leverage this for malicious actions in the future.

Bayer healthcare equipment was confirmed affected by WannaCry but service was restored in less than 24 hours. Other manufacturers have also issued security advisories:


Smiths Medical


Johnson & Johnson

The US ICS CERT have issued an alert with recommendations for critical infrastructure devices. Affected vendors include those mentioned above and GE, Philips, Tridium, Emerson Automaton Solutions, Schneider Electric (among others).

Please note the above link for the ICS CERT advisory is https://ics-cert.us-cert.gov/alerts/ICS-ALERT-17-135-01D If this advisory is updated it will become https://ics-cert.us-cert.gov/alerts/ICS-ALERT-17-135-01E Further updates will change the final letter to F, G and so on.

ICS CERT also issued an FAQ on WannaCry which you may find useful.

Additional advice/considerations:
At this time there is no known way to decrypt your files if you have been effected by the WanaCrypt0r ransomware. If you have the option of restoring your files from a backup, please do so. Your only other option is discussed by BleepingComputer at the end of this article.

If you followed the advice earlier in the week and turned off your systems before they were infected, that was a wise precaution. However when you power them back on you will need to avoid them becoming infected before you can secure them. A French security researcher had a honeypot (defined) of theirs infected 6 times in 90 minutes.

If you can segregate your vulnerable devices (including devices within your network perimeter) so they don’t expose the following ports:

  • TCP port 445 with related protocols on UDP ports 137-138
  • TCP port 139
  • Also disable SMBv1 (it’s a deprecated protocol)
  • Please also block the Remote Desktop Protocol (RDP) port 3389 (defined) at the entry point to your corporate to prevent the spread of this malware as recommended by the US CERT.

Once you have updated your Windows devices against this vulnerability, please by all means resume normal operations but follow the advice of the US CERT and avoid having the SMB port exposed to the internet going forward as a defense in-depth measure (defined)(PDF).

Other recommendations are as follows:

  • It’s important to understand, installing the update mentioned in this post will protect your Windows systems from spreading the ransomware to other systems. If you click on a link in a suspicious email (or another source) the ransomware may still be downloaded but will only encrypt/effect your system.
  • For any critical systems, ask if they really need to be connected to the internet or not? Avoid unnecessarily connecting them.
  • Provide your staff with security awareness training (defined)(PDF). This will prevent this malware infecting your systems by means of phishing (defined) (which can still encrypt your data even if you have installed the above recommended security update, that update only blocks the spreading of the infection). According to the US CERT and HelpNetSecurity this advice isn’t confirmed but it will not reduce your protection.
  • Verify your organization can recover from a ransomware attack like this as part of your Business continuity process (BCP)(defined)(PDF).
  • If you have an incident response team, verify their standard response process against a ransomware attack like this to ensure it is fit for purpose.

Thank you.


Affected Windows versions:
While the MS17-010 security bulletin lists which versions of Windows are vulnerable to this ransomware, I have listed them all below (this applies to all 32 and 64 bit versions of Windows listed below):

Windows XP (with Service Pack 3)

Windows Server 2003 (with Service Pack 2)

Windows Vista (with Service Pack 2)

Windows Server 2008 (with Service Pack 2)

Windows Server 2008 (with Service Pack 2)(Server Core installation)(defined)

Windows 7 (with Service Pack 1)

Windows Server 2008 R2 (with Service Pack 1)

Windows Server 2008 R2 (with Service Pack 1)(Server Core installation)

Windows 8.0

Windows 8.1 (with 8.1 Update (April 2014))

Windows Server 2012

Windows Server 2012 (Server Core installation)

Windows Server 2012 R2

Windows Server 2012 R2 (Server Core installation)

Windows RT 8.1

Windows 10 Version 1507

Windows 10 Version 1511

Windows 10 Version 1607

Windows Server 2016

Windows Server 2016 (Server Core installation)

Siemens Issues Security Updates for SIMATIC HMI Devices and Software

In late August a set of security updates was made available by Siemens for its SIMATIC HMI devices, SIMATIC WinCC Runtime Advanced software, SIMATIC WinCC v7 software and SIMATIC NET PC-Software V12 and V13.

The HMI (Human Machine Interface) devices allow a user to easily interface with industrial control and supervisory control and data acquisition (SCADA) systems via widescreen displays and multi-touch devices. The SIMATIC WinCC Runtime Advanced and Professional software provide this capability. The SIMATIC NET PC-Software is required for communication between a controller (SIMATIC S7 controller) and PC-based solutions (e.g., SIMATIC WinCC).

These updates address 3 remotely exploitable CVEs (defined) which include resource exhaustion (defined), a man-in-the-middle (MITM) attack (defined) and password-hashing (defined) implementation flaws.

The resource exhaustion vulnerability could be exploited by an attacker if they were located on the network connection between an HMI panel and a PLC (i.e. a man-in-the-middle (MITM) attack) and they could send network packets to the HMI over TCP port 102. Such specifically crafted packets would result in a denial of service (defined) issue for these devices.

The separate man in the middle category of attack mentioned above involves a similar means of attack but this time the attacker is located between the PLCs and their communication partners allowing the attacker to both intercept the packets between these devices and to modify them.

Finally the password hashing vulnerability involves the attacker using the password hashes obtained through another means to grant themselves the same usage rights as the rightful users of those passwords to access SIMATIC WinCC and SIMATIC PCS 7 software.

Why Should These Issues Be Considered Important?
Using these vulnerabilities remote attackers could cause denial of service issues to the above mentioned Siemens devices and/or obtaining the permissions of legitimate users of the SIMATIC WinCC and SIMATIC PCS 7 software used to monitor and control these devices. With the large industrial systems these devices control/operate these flaws can have serious physical consequences (see the notable example mentioned below).

How Can I Protect Myself From These Issues?
Please follow the instructions within this ICS CERT security advisory (specifically the Mitigation section) to update any affected industrial Siemens products that you may be using.

One interesting aspect about these flaws is that the above mentioned Siemens HMI devices are in use by the well-known Large Hadron Collider located underground near Geneva, Switzerland and operated by the European Organization for Nuclear Research (CERN). This underlines the important functions that these devices control whether it be the Hadron Collider or your nearest power station.

Thank you.

Siemens Updates Simatic Products Against “Ghost” (glibc) Security Flaw

Earlier this week security updates were made available by Siemens for its Simatic products (Industrial Data Network Controllers) to resolve an issue in the GNU C library that was reported in January this year. Updates were already available for its Ruggedcom (industrial routers) and its SINUMERIK controllers in March. These products are deployed in industrial sectors to provide data networking capabilities within large production lines and processing facilities e.g. water treatment.

Please follow the instructions within the ICS CERT security advisory to update any affected industrial Siemens products that you may be using.

Background on the Ghost Flaw

In January of this year a buffer overflow affecting the gethostbyname() and gethostbyname2() functions within the GNU C library was discovered by security researchers at Qualys. Both functions are considered deprecated since a newer function getaddrinfo() replaces them. This is a denial of service flaw (in the context of the above mentioned industrial networking components) but there is a possibility of remote code execution.

This flaw was caused by an efficiency improvement within the gethostbyname(). If this function receives an IP address, it will not have to resolve a hostname to an IP address for you (by using a DNS lookup) since the parameter passed is already an IP address. However this code does not check the length of the IP address passed to it as a parameter and this causes the buffer overflow. Please note that the parameter being passed to this function would need to be specifically chosen to crash the code in a way that allows remote code execution for that specific software and hardware platform. Thus such attacks would need to more targeted and would not be trivial to exploit.

Updates to resolve this flaw were released in January by Red Hat, SUSE Linux, Ubuntu and Debian (among others). If you have not already done so, please apply any security updates to your Linux systems and restart those systems for the updates to take effect.

Update: 29th May 2015:
Further defence in-depth advice concerning how to defend a Linux system from attack is provided in this blog post.

Update: 7th September 2015: In addition, as mentioned in this more recent blog post, the Linux Foundation has published a security checklist (intended for Linux system administrators) to harden Linux systems against attack.

Thank you.