Related topics

Another systematic SCADA vuln

CoDeSys environment gives World+Dog networked command-line root

Death

If it’s Monday, it must be time for a new SCADA vulnerability: this time, arising through the combination of a popular development environment and bad developer habits.

Described in full by Digital Bond researcher Reid Wightman here, as many as 261 manufacturers and heaven-knows-how-many deployed systems may have created insecure systems using the software.

The software in question is CoDeSys, from German company S3. This provides a control system development environment, which writes finished code to a runtime engine. Because the runtime needs access to /dev (if the target system is Linux) and an output bus, Wightman says the runtime is often given root or (in the case of Windows-based targets) administrator access.

And that becomes a problem when the environment provides network access to the command line – in the case of CoDeSys, via a TCP listener that’s part of the executable binary.

“The TCP listener service allows for file transfer as well as a command-line interface,” the post states. “Neither the command-line interface nor the file transfer functionality requires authentication.

“The result of all of this is that a user with the right know-how can connect to the command-line of CoDeSys and execute commands, as well as transfer files. Commands include the ability to stop and start the running ladder logic, wipe PLC memory, and list files and directories. Transferring files include the ability to send and receive. Sending and receiving files also suffers from directory traversal — we can read and write files outside of the CoDeSys directory on the controller using “../” notation. On most operating systems this includes the ability to overwrite critical configuration files such as /etc/passwd and /etc/shadow on Linux, or the Windows registry on Windows CE.”

Apparently, the sole protection against malicious access built into the system is in its licensing system: the CoDeSys target system is only supposed to talk to its own PLC-Browser software. This, as Wightman has demonstrated (complete with code), is easily bypassed – meaning that any system visible to the Internet is vulnerable to attack. ®

Sponsored: 10 ways wire data helps conquer IT complexity