Researchers at Forescout Research’s Vedere Labs have successfully utilized Anthropic’s Claude to transfer a pre-authentication remote code execution (RCE) exploit from one WAGO programmable logic controller (PLC) model to another. This breakthrough involved executing attacker-supplied ARM shellcode on operational hardware, marking a significant development in the field of cybersecurity.
Understanding the Exploit Target
The exploit in question targets a critical vulnerability identified as CVE-2021-31886, which involves a stack-based buffer overflow within the Nucleus FTP server. This vulnerability, impacting the USER command, has been assigned a CVSS score of 9.8 by Siemens, underscoring its severity. It is accessible before authentication through TCP port 21, presenting significant security concerns.
Despite the seriousness of this vulnerability, CERT@VDE has indicated that no updates are available for the affected WAGO controllers. The advisory recommends disabling or blocking FTP on port 21, implementing segmentation controls, and closely monitoring network traffic to detect any anomalies.
Challenges and Costs of Exploit Porting
The process of porting the exploit was not without its challenges. Researchers had to maintain continuous guidance throughout, and the final stage of RCE development incurred a cost of $535.74, taking over eight hours to complete. An attempt to evolve the exploit into a command-and-control (C2) implant resulted in damage to the PLC, highlighting the complexity and risks involved.
Forescout noted that a researcher could potentially achieve similar results without AI assistance, likely at a reduced cost and without damaging the PLC. The initial exploit was developed for the WAGO 750-852 model and later transferred to a WAGO 750-831 with firmware version V01.04.16.
Implications for Network Security
The research involved multiple interactive sessions between the researchers and Claude, utilizing tools such as Ghidra and a terminal to interact with the target PLC. Despite initial setbacks, the team successfully adapted the exploit, allowing the injected shellcode to execute before being overwritten.
Once code execution was achieved, researchers quickly developed two functional payloads. One payload sent ICMP echo requests back to an attacker-controlled system, while the other transmitted a UDP packet with the message “PWNED.” These actions demonstrate the exploit’s capability to send network packets, posing a potential threat to operational technology (OT) networks.
Additionally, the research uncovered a possible new vulnerability in the FTP command extraction loop, distinct from CVE-2021-31886. Although this issue lacks a CVE identifier, it remains under investigation by the team.
Future Outlook and Security Recommendations
Currently, there are no updates available for the Nucleus V1 RTOS, which underpins the affected PLC models. Siemens has indicated that no further remediation is planned for Nucleus NET, although some newer releases address the vulnerability.
Reflecting on the broader implications, Forescout’s research suggests that organizations should consider revisiting their risk assessments in light of AI advancements. This sentiment is echoed in a joint advisory issued by multiple U.S. agencies, warning of AI-generated exploitation scripts targeting Siemens S7 Series PLCs.
The advisory underscores the evolving capabilities of threat actors, who are increasingly utilizing AI to streamline the development of exploitation scripts and malicious tools. This shift necessitates heightened vigilance and proactive measures to safeguard critical infrastructure against emerging digital threats.
