Trustwave SpiderLabs Security Advisory TWSL2020-007: Multiple Vulnerabilities in Modicon M221 controllers and EcoStruxure Machine Expert - Basic Programming Software Published: 12/09/2020 Version: 2.0 Vendor: Schneider Electric (https://www.se.com/) Product: Modicon M221 controllers and EcoStruxure Machine Expert - Basic Programming Software Version affected: Firmware 1.10.2.2 and Software V1.0 Product description: The Modicon M221 is a Nano Programmable Logic Controller (PLC) made to control basic automation for machines. Finding 1: Use of Small Space Seed in the Encryption Routine *****Credit: Seok Min Lim of Trustwave, Bryon Kaan of Trustwave CVE: CVE-2020-7566 CWE: CWE-334 One of the random parameters used in the encryption routine is only 2-byte in length. This makes it possible for the attacker to brute force and obtain the encryption key if he has captured sufficient information in the network. The attacker can use this encryption key to decrypt the encrypted hashed password that is sent to the controller to unlock read/write protection and conduct further attacks on the controller. Finding 2: Bypass Protected Project Using an Alternate Channel from Controller *****Credit: Seok Min Lim of Trustwave, Bryon Kaan of Trustwave CVE: CVE-2020-7568 CWE: CWE-200 An alternate channel can bypass read protection even though the read protection is enabled on the controller. This channel does not require any password and can be used by the attacker to perform reconnaissance on the controller's application. Finding 3: Use of a One-way Hash with a Predictable Salt on Read/Write Protection's Passwords *****Credit: Seok Min Lim of Trustwave CVE: CVE-2020-28214 CWE: CWE-760 EcoStruxure Machine Expert 1.0 uses a hard-coded salt when it computes password hashes. This makes it easier for the attackers to guess the passwords using a brute force attack. Remediation Steps: Apply the latest vendor supplied patches. There is no patch available for EcoStruxure Machine Expert using hard-coded salts. To limit exposure, network access to these devices should be limited to authorized personnel through the use of Access Control Lists and proper network segmentation. Revision History: 08/03/2020 - Vulnerability disclosed to vendor 11/10/2020 - Patch released by vendor 11/12/2020 - Advisory 1.0 published 12/09/2020 - Vendor notification (SEVD-2020-315-05) added CVE-2020-28214 12/09/2020 - Advisory 2.0 published References 1. https://download.schneider-electric.com/files?p_enDocType=Technical+leaflet&p_File_Name=SEVD-2020-315-05_Modicon_M221_PLC_Security_Notification.pdf&p_Doc_Ref=SEVD-2020-315-05 About Trustwave: Trustwave helps businesses fight cybercrime, protect data and reduce security risk. With cloud and managed security services, integrated technologies and a team of security experts, ethical hackers and researchers, Trustwave enables businesses to transform the way they manage their information security and compliance programs. More than three million businesses are enrolled in the Trustwave TrustKeeper® cloud platform, through which Trustwave delivers automated, efficient and cost-effective threat, vulnerability and compliance management. Trustwave is headquartered in Chicago, with customers in 96 countries. For more information about Trustwave, visit https://www.trustwave.com. About Trustwave SpiderLabs: SpiderLabs(R) is the advanced security team at Trustwave focused on application security, incident response, penetration testing, physical security and security research. The team has performed over a thousand incident investigations, thousands of penetration tests and hundreds of application security tests globally. In addition, the SpiderLabs Research team provides intelligence through bleeding-edge research and proof of concept tool development to enhance Trustwave's products and services. https://www.trustwave.com/spiderlabs Disclaimer: The information provided in this advisory is provided "as is" without warranty of any kind. Trustwave disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Trustwave or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Trustwave or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.