Claude AI Builds Pre-Auth RCE Exploit for WAGO PLC to Execute ARM Shellcode Without Credentials

Blog WriterCybersecurity News - Original News Source is cybersecuritynews.com

Spread the love

Researchers used Claude AI to help port a pre-authentication remote code execution exploit to a WAGO programmable logic controller, demonstrating how AI can assist with low-level operational technology exploitation.

The experiment achieved arbitrary ARM shellcode execution on a WAGO 750-831 PLC without valid credentials. However, it required major human involvement, expensive API usage, and eventually bricked the test device.

The exploit targeted CVE-2021-31886, a buffer overflow affecting the Nucleus FTP server used in several embedded products. The flaw exists because the FTP service fails to validate the length of a username submitted through the USER command.

A specially crafted oversized username can overwrite memory and redirect program execution. Forescout researchers focused on a WAGO 750-831 PLC running firmware V01.04.16. Researchers already had a working exploit for the related WAGO 750-852 model.

Claude AI Builds Pre-Auth RCE Exploit for WAGO PLC

They used Claude to identify the new device’s target-specific memory addresses, function offsets, callback locations, and shellcode storage regions.

Unlike conventional web or application exploitation, the PLC test involved a closed-source embedded device with no access to a debugger.

Claude Code used firmware analysis tools, Ghidra, generated Python scripts, and network testing utilities to inspect the firmware and interact with the live controller.

However, the AI initially followed incorrect code paths, generated invalid exploit attempts, and required researchers to provide disassembly details and steer the analysis.

ICMP beacon exploit (source : forescout )
ICMP beacon exploit (source: Forescout)

The first successful result was a crash, confirming that the overflow could be triggered. Achieving reliable RCE proved much harder.

Forescout researchers found that normal FTP command processing erased the attacker-controlled buffer after the USER command was handled, preventing the injected ARM shellcode from surviving long enough to execute.

Claude identified that the exploit could preserve the payload by changing the FTP command sequence. Instead of using the original USER followed by QUIT flow, the final approach used a USER followed by CWD sequence and omitted the CRLF command terminator.

This prevented the normal completion path from clearing the memory buffer. After solving the buffer-preservation problem, Claude quickly generated working payloads. One payload made the PLC send ICMP echo requests to an attacker-controlled system.

At the same time, another transmitted a UDP packet containing the text “PWNED.” The exploit required network access to FTP port 21. However, it did not require authentication because the vulnerable USER command is processed before login.

The final RCE development stage consumed $535.74 in API usage. It lasted 8 hours and 32 minutes across several research sessions; most of the effort involved reverse-engineering the FTP processing chain and understanding why the shellcode was overwritten.

Researchers then attempted to extend the proof of concept into a command-and-control implant. During memory probing and payload testing, one AI-generated payload wrote to flash-mapped memory, permanently bricking the PLC.

The incident illustrates the safety risks of autonomous or semi-autonomous testing against cyber-physical devices. The findings show that AI can help adapt embedded exploits across similar OT targets, although specialist expertise remains essential.

Organizations should restrict unnecessary exposure to FTP and remote management, monitor PLCs for crashes and unexpected outbound traffic, and treat difficult-to-exploit OT flaws as potentially more significant as AI reduces the effort required to develop exploits.

Learn 7 Metric-Gated AI SOC Deployment Phases – Download Free AI SOC Deployment Playbook 2026.

The post Claude AI Builds Pre-Auth RCE Exploit for WAGO PLC to Execute ARM Shellcode Without Credentials appeared first on Cyber Security News.